[categories] [index] [all (552)] [latest]
Store last procedure as needed
/lastProc (-) def
/!{ /lastProc exch def } def
/CreateOrTruncateInputFile {
(CreateOrTruncateInputFile)!
% ...
} bind def
Print last saved procedure in error handler
errordict /handleerror {
(-- Error occured! n) print
(Error : ) print $error /errorname get ==
(Procedure: ) print lastProc ==
(Command : ) print $error /command get ==
(Operands : ) print $error /ostack get ==
(Dicts : ) print $error /dstack get ==
(Exec : ) print $error /estack get ==
stop
} put
Errors will look like:
-- Error occured!
Error : /stackunderflow
Procedure: (CheckFullLine_b_rowsFull_)
Command : --put--
Operands : [false false]
(...)