bugGNU Octave - Bugs: bug #65078, inputParser should use helpful...


bug #65078: inputParser should use helpful error IDs when throwing exceptions

Submitter:  Bill Greene <billgreene>
Submitted:  Sat 23 Dec 2023 12:56:24 PM UTC
Category:  Octave Function Severity:  1 - Wish
Priority:  5 - Normal Item Group:  Feature Request
Status:  Need Info Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * 8.4.0 Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup

Mon 15 Jan 2024 04:56:30 AM UTC, comment #3: 

Re-titled bug report for clarity.

Rik <rik5>
Group administrator
Tue 26 Dec 2023 08:52:16 PM UTC, comment #2: 

>What is the format of the ID in Matlab?

Here is an example:'MATLAB:unrecognizedStringChoice'
In general, the string after the : is suggestive of the error.

Bill Greene <billgreene>
Tue 26 Dec 2023 08:11:18 PM UTC, comment #1: 

This seems like a reasonable idea.

What is the format of the ID in Matlab?  Where is the function name embedded in the ID?

If the function is embedded in the ID, should it also be embedded in the error message itself?

Rik <rik5>
Group administrator
Sat 23 Dec 2023 12:56:24 PM UTC, original submission:  

When inputParser throws an exception it includes the error message from the validation function but does not include the identifier.

The offending line in inputParser is:

error ("%s%s", where, msg);

This should support something like:

error (id, "%s%s", where, msg);

where id is set from the validation function exception.

Matlab inputParser DOES work in this way and makes it possible to
do more intelligent up-stream handling of the error.

Bill Greene <billgreene>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by billgreene (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.


    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-01-15 rik5 Severity3 - Normal 1 - Wish
        Item GroupMatlab Compatibility Feature Request
        SummaryinputParser thrown exception inputParser should use helpful error IDs when throwing exceptions
    2023-12-26 rik5 StatusNone Need Info

    Back to the top

    Powered by Savane 3.12.
    Corresponding source code