File: errcatch.cat

package info (click to toggle)
scilab 2.6-4
  • links: PTS
  • area: non-free
  • in suites: woody
  • size: 54,632 kB
  • ctags: 40,267
  • sloc: ansic: 267,851; fortran: 166,549; sh: 10,005; makefile: 4,119; tcl: 1,070; cpp: 233; csh: 143; asm: 135; perl: 130; java: 39
file content (50 lines) | stat: -rw-r--r-- 1,897 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
errcatch          Scilab Group          Scilab Function            errcatch
NAME
   errcatch - error trapping
  
CALLING SEQUENCE
 errcatch(n [,'action'] [,'option']) 
PARAMETERS
 n                    : integer 
                      
 action, option       : strings
                      
DESCRIPTION
   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:
  
 "pause"      : a pause is executed when trapping the error. This option
              is useful for debugging purposes. Use whereami() to get
              informations on the current context.
              
 "continue"   : 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 iserror function. Do
              not forget to clear the error using the errclear function as
              soon as possible  This option is useful for error recovery.
              In many cases, usage of  errcatch(n,"continue",..) can be
              replaced by the use of execstr function.  
              
 "kill"       : default mode, all intermediate functions are killed,
              scilab goes back to the level 0 prompt.
              
 "stop"       : interrupts the current Scilab session (useful when  Scilab
              is called from an external program).
              
 option is the character string 'nomessage' for killing error message.
 
 To set back default mode, enter errcatch(-1,"kill") or similarly
 errcatch(-1). 
 
 Then called in a scilab function the errcatch is automatically reset to
 the default mode when the function returns.
 
SEE ALSO
 errclear, iserror, whereami, execstr