Download ALisp v2 User's Guide
Transcript
To cause an error signal without any error message call (RESET). As any other error these functions will go through the regular error management mechanisms. User errors can be caught with UNWIND-PROTECT or CATCH-ERROR. 6.3. User interrupts After an interrupt is generated (e.g. CTRL-C) the system calls the Lisp function (CATCHINTERRUPT) By default CATCHITERRUPT resets Lisp. In debug mode a break loop is entered when CTRL-C is typed. For disable (delay) CTRL-C during evaluation of a FORM, use: (DOUNITERRUPTED FORM) 6.4. Error management functions Below follows short descriptions of system functions and variables for error management. Function Type Description (CATCH-ERROR FORM CLEANUP) MACRO Trap and repair errors. CLEANUP is optional. (CATCHDEMON LOC VAL) LAMBDA See SETDEMON. (CATCHINTERRUPT) LAMBDA This system function is called whenever the user hits CTRL-C. Different actions will be taken depending on the state of the system. (DOUNITERRUPTED FORM) MACRO Delays interrupts happening during the evaluation of FORM until DOUNITERRUPTED is exited. (ERRCOND-ARG EC) LAMBDA Get the argument of an error condition. (ERRCOND-MSG EC) LAMBDA Get the error message of an error condition. (ERRCOND-NUMBER EC) LAMBDA Get the error number of an error condition. (ERROR MSG X) LAMBDA Print message MSG followed by ’: ’ and X and then generates an error. (ERROR? X) LAMBDA True if X is an error condition. (FAULTEVAL ERRNO ERRMSG X FORM ENV) LAMBDA FAULTEVAL is called whenever the system detects an error. If the system runs in debug mode FAULTEVAL then enters a break loop (Sec. 7.1). If the system is not in debug mode FAULTEVAL prints the error message and calls (RESET). (FRAMENO) EXTFN Return the frame number of the top frame of the stack. (HARDRESET) EXTFN Does a ’hard’ reset ignoring UNWIND-PROTECT. Called after fatal errors such as stack overflow. (RESET) EXTFN Signals an error. The control is returned to the latest reset point. The reset point is either the ALisp top loop or the latest call to 42