[Home]BetterInterpreterErrorMessages

LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org

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 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.


This has been implemented and works. Note that Axis will require a change to handle this the same way the normal interpreter does. Right now, Axis prints the dummy message associated with NCE_VARIABLE.

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