Error Handling There are three facilities for error handling in Maple: ERROR, lasterror, and traperror. ERROR The syntax of the ERROR statement is simply: ERROR(error-message-string); The "ERROR" must be in capital letters. When you use ERROR in procedures to indicate that something has gone wrong, you will see a message printed of the form: Error, (in functname) error-message-string As is the case with Maple-detected errors, the computation is then interrupted and aborted. lasterror and traperror The variable lasterror records the most recent kind of ERROR. The function traperror evaluates an expression sequence and returns the value if there were no errors, or lasterror if there was an error. You can use these two features in combination to control error handling yourself instead of just having Maple interrupt and abort processing.