error trapping
errcatch(n [,'action'] [,'option'])
errcatch()
:n integer : :action, option strings :
errcatch gives an “action” (error-handler) to be performed when an error of type n occurs.
n has the following meaning:
if n>0, n is the error number to trap;
if n<0 all errors are to be trapped.
action is one of the following character strings:
:
option is the character string ‘nomessage’ for killing error message.
To set back default mode, enter errcatch(-1,”kill”) or similarly errcatch(-1). errcatch() is an obsolete equivalent of errcatch(-1).
The errcatch actions apply to the current evalution context ( function, exec, pause) and all the sub-levels. A second errcatch call in a sub-level hides the initial one for this sub- level. If a second errcatch call is made at the same level, the effect of the first one is removed.
When called in the context of a Scilab function or exec the errcatch is automatically reset when the function returns.