error s
exampleCode = p -> ( if not isPrime p then error "expected a prime integer"; if p == 2 then error "expected an odd prime"; lift((p+1)/2, ZZ) );
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.
If the error message begins with a hyphen, then the word "error" will not be inserted into the error message.
The object error is a function closure.