Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
CMake
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nzh63
CMake
Commits
49fce337
Commit
49fce337
authored
4 years ago
by
Peter Steneteg
Committed by
Craig Scott
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Help: Clarify string(JSON) error handling
Closes: #21355
parent
9fa7afe7
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Help/command/string.rst
+13
-10
13 additions, 10 deletions
Help/command/string.rst
with
13 additions
and
10 deletions
Help/command/string.rst
+
13
−
10
View file @
49fce337
...
...
@@ -491,6 +491,16 @@ JSON
Functionality for querying a JSON string.
.. note::
In each of the following JSON-related subcommands, if the optional
``ERROR_VARIABLE`` argument is given, errors will be reported in
``<error-variable>`` and the ``<out-var>`` will be set to
``<member|index>-[<member|index>...]-NOTFOUND`` with the path elements
up to the point where the error occurred, or just ``NOTFOUND`` if there
is no relevant path. If an error occurs but the ``ERROR_VARIABLE``
option is not present, a fatal error message is generated. If no error
occurs, the ``<error-variable>`` will be set to ``NOTFOUND``.
.. _GET:
.. code-block:: cmake
...
...
@@ -563,13 +573,6 @@ The contents of ``<value>`` should be valid JSON.
EQUAL <json-string1> <json-string2>)
Compare the two JSON objects given by ``<json-string1>`` and ``<json-string2>``
for equality
If the optional ``ERROR_VARIABLE`` argument is given, errors will be
reported in ``<error-variable>``. If no error occurs, the ``<error-variable>``
will be set to ``NOTFOUND``. If ``ERROR_VARIABLE`` is not set a CMake error
will be issued.
When an error occurs the ``<out-var>`` will be set to
``<member|index>-[<member|index>...]-NOTFOUND`` with the path elements up to
the point where the error occurred.
for equality. The contents of ``<json-string1>`` and ``<json-string2>``
should be valid JSON. The ``<out-var>`` will be set to a true value if the
JSON objects are considered equal, or a false value otherwise.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment