[top][index]
search for:

error -- deliver error message

error s -- causes an error message s to be displayed.

The error message s (which should be a string or a sequence of things which can be converted to strings and concatenated) is printed. Execution of the code is interrupted, and control is returned to top level.

Eventually we will have a means of ensuring that the line number printed out with the error message will have more significance, but currently it is the location in the code of the error expression itself.

Code:

     -- ../../../Macaulay2/m2/debugging.m2:5-7
     error = args -> olderror apply(
          sequence args, x -> if class x === String then x else toString x
          )

[top][index]
search for: