[Home]BetterInterpreterErrorMessages

LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org

Showing revision 1
Error messages from the interpreter are fixed text which convey little additional information. While this might have been sufficient for the original NIST environment, it does not meet todays requirements.

A change that permits the call to a (o-word) subroutine prior to its definition in a file is an example. It would be desirable to give the error: "Unable to find oNNNN called from line MMMM in file abc.ngc", for instance. That is not possible given the current environment.

It would be desirable if the changes did not require that the existing error calls not have to be rewritten unless they required more information.

The following is an approach that is under consideration:


Add a new error number significantly higher that any existing error number to the file rs274ngc_return.hh -- Give it the symbol: NCE_VARIABLE.

Add a function: Interp::setError(fmt, ...) that will take an error text and arguments like printf, format the message, and save it within the interpreter data structures.

Modify the function Interp::error_text to return the last such string that has been stored if the error code is NCE_VARIABLE.

Comment are requested.



LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org
This page is read-only. Follow the BasicSteps to edit pages. | View other revisions | View current revision
Edited February 5, 2007 7:35 pm by Lerman (diff)
Search:
Published under a Creative Commons License