acet-error-init


(acet-error-init  initdata)

Initialises an error handler due to arguments contained in initdata list;
initdata is a list of up to three items or NIL :

item 1 :
list of system variables and value to set - '("cmdecho" 0 "osmode" 0 ...) or NIL
the actual values of the specified system variables are saved for later (acet-error-restore) call, and will also be restored in case of an error

item 2 :
flag indicating UNDO usage :
NIL means not using UNDO at all
0 means Undo/Begin is placed, but no UNDO is done in case of an error
1 means means Undo/Begin is placed, and UNDO operation is done in case of an error

item 3 :
optional a custom function or expression to be called in case of an error (can be a quoted expression, function, lambda, defun etc.);
this optional error expression will only be used if the item 2 is provided as 1

When using this function, the Lisp code should also call the matching (acet-error-restore) at end of execution.

Note :
(acet-error-init) and (acet-error-restore) functions can be used in nested function calls.
In such case, the UNDO operation handling is initialised resp. executed only in the first, outermost calls to (acet-error-init) and (acet-error-restore),
while system variables are properly saved and restored with each nesting level.


©  Bricsys NV. All rights reserved.