Previous: , Up: Error Messages   [Contents][Index]

9.1.2 Execution Errors

If something goes wrong during execution of your statements, then LUX tries to indicate in detail what went wrong and where, by displaying an error message. The error message lists the file or routine that the error occurred in, the line number within that file or (user-defined) routine, the offending piece of LUX code, a message specifying what error occurred, and successively wider contexts of the error, all the way up to the complete statement.

For example, if you type T,SQRT('alpha') then you’ll generate an error message because LUX cannot take the square root of a string. The error message is

(main),  2| 'alpha': Argument is of an illegal class
  2| SQRT('alpha')
  2| SQRT('alpha')
  2| T,SQRT('alpha') 

This message indicates that the error occurred at the main execution level (outside of any file or user-defined routine) in line number 2, that the offending piece of code was the string 'alpha', and that it is of an illegal class for this operation. The remaining lines show the position of the piece of offending code in successively wider contexts, up to the complete statement.