Next: 2.10.4 gcdict
Up: 2.10 Dictionary reference
Previous: 2.10.2 envdict
  Contents
  Index
2.10.3 errordict
Each thread has its own errordict, which is used by default by the error
handling machinery.
Table 2.6:
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.
- Errors(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-)
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-)
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.
- Errors(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-)
estack/istack trace (0..2):
0: x
1: -file-
2: --start--
Custom stop
Next: 2.10.4 gcdict
Up: 2.10 Dictionary reference
Previous: 2.10.2 envdict
  Contents
  Index
Jason Evans
2003-04-05