next up previous contents index
Next: 2.11.4 gcdict Up: 2.11 Dictionary reference Previous: 2.11.2 envdict   Contents   Index


2.11.3 errordict

Each thread has its own errordict, which is used by default by the error handling machinery.

Table 2.5: errordict summary
Input(s)
Op/Proc/Var
Output(s)
Description
-
handleerror
-
Print a state dump.
-
stop
-
Last operation during error handling.

- handleerror -:
Input(s):
None.
Output(s):
None.
Error(s):
Under normal conditions, no errors occur. However, it is possible for the application to corrupt the error handling machinery to the point that an error will occur. If that happens, the result is possible infinite recursion, and program crashes are a real possibility.
Description:
Print a dump of the most recent error recorded in the currenterror dictionary.
Example(s):
onyx:0> {true {true 1 sprint x y} if} eval
true
Error $undefined
ostack: ()
dstack: (-dict- -dict- -dict- -dict-)
cstack: ()
estack/istack trace (0..5):
0:      x
1: {
        true
        1
        sprint
 3:-->  x
        y
}
2:      --if--
3:      --eval--
4:      -file-
5:      --start--
onyx:1> errordict begin handleerror end
Error $undefined
ostack: ()
dstack: (-dict- -dict- -dict- -dict-)
cstack: ()
estack/istack trace (0..5):
0:      x
1: {
        true
        1
        sprint
 3:-->  x
        y
}
2:      --if--
3:      --eval--
4:      -file-
5:      --start--
onyx:1>
- stop -:
Input(s):
None.
Output(s):
None.
Error(s):
None.
Description:
This is called as the very last operation when an error occurs. Initially, its value is the same as that for the stop operator in systemdict.
Example(s):
onyx:0> errordict begin
onyx:0> $stop {`Custom stop\n' print flush quit} def
onyx:0> x
Error $undefined
ostack: ()
dstack: (-dict- -dict- -dict- -dict- -dict-)
cstack: ()
estack/istack trace (0..2):
0:      x
1:      -file-
2:      --start--
Custom stop


next up previous contents index
Next: 2.11.4 gcdict Up: 2.11 Dictionary reference Previous: 2.11.2 envdict   Contents   Index
Jason Evans 2005-03-16