Skip to content

Commit

Permalink
doc: Tweak documentation of error IDs (bug #66015)
Browse files Browse the repository at this point in the history
* error.cc (Ferror): Use @code rather than @var around function name.  User
"ERROR-NAME" rather than "WARNING-NAME".  Use template for error message in
example that starts with "fcn_name" to hint that this should be the name
of the function.
  • Loading branch information
Rik committed Oct 21, 2024
1 parent f527f37 commit 1ca4cfc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libinterp/corefcn/error.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1193,17 +1193,17 @@ by @samp{error: }.
The optional @var{id} argument allows programmers to tag an error
with a specific identifier so that users can later retrieve it (using
@code{lasterr} or @var{lasterror}) and know the origin of the error.
The identifier must contain at least one colon character (@qcode{":"})
@code{lasterr} or @code{lasterror}) and know the origin of the error.
The identifier must contain at least one colon character (@qcode{':'})
and must not contain any whitespace characters. It should be a string of
the form @qcode{"NAMESPACE:WARNING-NAME"}. Octave's own errors use the
the form @qcode{"NAMESPACE:ERROR-NAME"}. Octave's own errors use the
@qcode{"Octave"} namespace (@pxref{XREFerror_ids,,@code{error_ids}}).
For example:
@example
@group
error ("MyNameSpace:wrong-type-argument",
"foo: argument should be numeric");
"fcn_name: argument should be numeric");
@end group
@end example
Expand Down

0 comments on commit 1ca4cfc

Please sign in to comment.