octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Modifications to error handling for the command suggestion feature


From: Nicholas Jankowski
Subject: Re: Modifications to error handling for the command suggestion feature
Date: Sat, 19 May 2018 14:46:21 -0400



On Sat, May 19, 2018, 14:02 Sudeepam Pandey <address@hidden> wrote:
All,

I'm starting to guess that adding a command suggestion feature would require some changes to the error handling.

...

Could anyone help me understand how that call could be made or maybe, help me figure out a better way to make octave first print out the 'undefined near line' error message and then tell us something about the identifier which parser did not recognize? (perhaps some better place to make the call from?)

Not any help on the code, but I'm trying to think through the under-the-hood decision tree. 

1. Unrecognized function call
2. Check for unloaded possible package function - if so suggest installing/ loading.
3. If not prompt for to-be-implemented suggestions. Since its just text display this can include a version of the error message.
4. Else: error with explanation.

I think you need to leave some error condition as a final fallback to terminate execution. I don't know if you can call the the error message early before terminating execution. Maybe that's what you're suggesting?

This brings up another thought: if I make a typo in a script, do I want command suggestion to occur? I don't think so. If we mess with general error handling, can that be aware of whether the typo happened at the CLI?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]