errcatch - error trapping
errcatch(n [,'action'] [,'option'])
gives an "action" (error-handler) to be
performed when an error of type
has the following meaning:
is the error number to trap
all errors are to be trapped
is one of the following character strings:
: a pause is executed when trapping the error. This option is useful for debugging purposes. Use
to get informations on the current context.
: next instruction in the function or exec files is executed, current instruction is ignored. It is possible to check if an error has occured using the
function. Do not forget to clear the error using the
function as soon as possible This option is useful for error recovery. In many cases, usage of
can be replaced by the use of
: default mode, all intermediate functions are killed, scilab goes back to the level 0 prompt.
: interrupts the current Scilab session (useful when Scilab is called from an external program).
is the character string
To set back default mode, enter
Then called in a scilab function the
reset to the default mode when the function returns.