【发布时间】:2015-06-09 10:13:37
【问题描述】:
我不知道这个问题的标题应该怎么写……
我正在研究解释器,目前我正在研究错误处理。我看到有一个 $error 和 errordict 字典存储在 systemdict 中。
PLRM 包含有关可能发生的错误以及处理这些错误的几个步骤的信息。但是,当我在 ghostscript 中执行此命令时:
errordict /stackoverflow get ==
我收到以下信息:
{/stackoverflow {1 --.instopped-- {null --eq-- {--pop-- --pop-- --stop--} --if--} --if-- (I) false --.setdebug-- $error /.inerror --get-- 1 --.instopped-- {--pop-- } {--pop-- true} --ifelse-- {.unstoppederrorhandler} --if-- $error /globalmode --.currentglobal-- false --.setglobal-- --put-- $error /.inerror true --put-- $error /newerror true --put-- $error --exch-- /errorname --exch-- --put-- $error --exch-- /command --exch-- --put-- $error /errorinfo --known-- --not-- {$error /errorinfo null --put--} --if-- $error /recordstacks --get-- $error /errorname --get-- /VMerror --ne-- --and -- {--count-- --array-- --astore-- --dup-- $error /ostack 4 -1 --roll-- --countexecstack-- --array-- --execstack-- --dup-- --length-- 2 --sub-- 0 --exch-- --getinterval-- $error /estack 3 -1 --roll-- --countdictstack-- --array-- -dictstack-- $error /dstack 3 -1 --roll-- --put-- --put-- --put-- --aload-- --pop--} {$error /dstack --. undef-- $error /estack --.undef-- $error /ostack --.undef--} --ifelse-- $error /position --currentfile-- --status-- {--currentfile-- { --fileposition--} .internalstopped {--pop-- null} --if--} {$error /command --get-- --dup-- --type-- /filetype --eq-- {{--fileposition--} .internalstopped {--pop-- null } --if--} {--pop-- null} --ifelse--} --ifelse-- --put-- $error /globalmode --get-- $error /.nosetlocal --get-- --and-- --.setglobal-- $error /.inerror false --put-- --stop--} --exec--}
这似乎是一个打包数组:
errordict /stackoverflow get type pstack
结果:
打包数组类型
现在我在哪里可以找到此类信息(哪个手册?)?这些过程在哪里描述,以便我可以实施它们。
不仅是报错,其他算子好像也有一个packedarray(procedure)作为值,但是我在PLRM中找不到这个procedure的实现。
【问题讨论】:
标签: postscript