Skip to main content
Skip table of contents

The error handler report

This page applies to Harlequin v13.1r0 and later; both Harlequin Core and Harlequin MultiRIP


An example long-format report is shown below. As you can see it is divided into a header, and then reports on the operand, dictionary, execution and file stacks. The stack information will not be reported if recordstacks in $error is false, or if the error was VMerror . The entire error handler report will be suppressed if the error was interrupt .

The following example is from a PostScript file, which was deliberately changed to trigger an error:


TEXT
  ****************** ERROR HANDLER REPORT (Long format)
  ****************** ERROR: /undefined
  OFFENDING COMMAND: wibble
  ERROR INFO: []
  PS CONTEXT:
  SamplePS / OuterProc / OuterProc SamplePS / MiddleProc / MiddleProc SamplePS / InnerProc / InnerProc
  VMSTATUS: 3 405764 2826432
  CTM: [8.33333 0.0 0.0 -8.33333 -0.0 6600.0 ]
  COLORSPACE: [/DeviceGray ]
  CURRENT FONT: (W-R+L) "Courier" DLD1 [10.0 0.0 0.0 -10.0 0.0 0.0 ]
  OPERAND STACK: 4
  ****0:(realtype) 27.6667
  ****1:(booleantype) false
  ****2:(integertype) 0
  ****3:(dicttype) (W+R+L) userdict(length 71 / max 256)
  DICTIONARY STACK: 6
  ****0: (W+R+L) statusdict(length 146 / max 200)
  ****1: (W+R+L) UNKNOWN DICT <<
  *** xpqA 0.166667
  *** xpct2 ()
  *** xprh {xpfg 6 0 --put-xpih --aload---pop---setdash-
  *** setpageparams {letter xppop2 0 --exch-792 --sub---neg---translate--pop-}
  *** xppopcolor {xpcustmprsnt {xppop2 } {xpcmykprsnt {xppop4 } {--pop--} --ifelse-}
  --ifelse-}
  *** ... ...
  >> (length 202 / max 300)
  ****2: (W+R+L) md(length 223 / max 270)
  ****3: (W+R+L) userdict(length 71 / max 256)
  ****4: (W+R+G) globaldict(length 2 / max 128)
  ****5: (W-R+G) systemdict(length 378 / max 512)
  EXECUTION STACK: 4
  ****0:{1080 1584 0 1 setpageparams {} settransfer --end-pxs pys –scale-ppr --aload---pop-por {--pop---exch---neg---exch---translate---pop-} {--translate---pop---pop 270 --rotate-} --ifelse-1 -1 --scale-}
  ****1:{{--newpath---clippath---mark-{--transform-{--itransform---moveto--} } {--transform-{--itransform---lineto-} } {6 -2 --roll---transform-6 -2 --roll---transform-6 -2 --roll---transform-{--itransform-6 2 --roll---itransform-6 2 --roll -
  ****5: (W-R+G)systemdict(length 378 / max 512) --itransform-6 2 --roll---curveto-} } {{--closepath-} } --pathforall---newpath---counttomark---array---astore-/gc xdf --pop-} --exec--}
  ****2:file: "%EP12Quadra950%ErrorJob.PS"
  ****3:--stopped--
  FILE STACK:
  ****:"%EP12Quadra950%ErrorJob.PS" realfile, open, line: 507, byte: 24642
  **FOLLOWING LINES:
  %%EndDocumentSetup
  %%Page: ? 1 op
  0 xl
  1 pen
  0 gm
  (nc 0 0 1584 1080 6 rc)kp
  0.64314 0 0.24705 setrgbcolor
  1 xppen
  0 xps
  Job Not Completed: HX3fx; document: MT class page


The header contains a few details about the error itself and the current state of the interpreter. The error info may include additional information about what triggered the error.

The PS context list will show stack tracking information from calls to HqnAssert .

For more information see Relationship between asserts and the error handler .


Vvmstatus , CTM , and colorspace are as returned by the vmstatus , currentmatrix , and currentcolorspace operators.


The current font is reported by name, font type, access and its ScaleMatrix entry, which may be used to determine its size, and rotation and any shearing etc. The access information is displayed in a standard format which will be used throughout the report:

The first element describes whether the dictionary is write protected or not, Wmeans it is write-protected, W+ means that it can be written to.


The second element describes whether the dictionary is readable or not, using R+ and Rin the same way as for write-protection.


The third element describes whether the dictionary is in local or global VM – L means local and G means global.


Thus the (W-R+L) access in the example above means that the font dictionary is write protected, but may be read and is in local VM.


The operand stack describes the elements which were on the operand stack when the operator which caused the error was called. The **** is present simply to allow the start of each operand to be found easily when some of them are rather long, as they can be if they are arrays or PostScript language procedures. The numbers immediately after the asterisks record the position in the operand stack – 0 is the top of the stack.

The value and type of each object is then reported, together with additional details depending on the type.

The access (write protection, read protection, and whether the object is in local or global VM) is reported for all compound objects (arrays, procedures, strings, dictionaries) as described in the previous paragraphs for the current font.

Where possible the lengths of arrays, procedures and strings are reported. The lengths and maximum lengths of dictionaries are shown. If any compound object is read-protected, then these are omitted.

Wherever possible the names of dictionaries are determined as the job is interpreted, but in some cases the dictionary is not named at all (e.g. the job contained something of the form of 6 dict begin ), or the name of the dictionary cannot be intercepted. In these cases, the dictionary is reported as an UNKNOWN DICT and the first few items of the dictionary are listed to allow some attempt at identification to be made. The items are obtained by a call to the PostScript language forall operator, which means that their selection may vary from time to time when the job is run. The maximum number of entries to be reported is defined by fullDictReport as described above. The default value for long format reports is six, meaning that any dictionary containing six or fewer values will be reported in full. If the dictionary contains more than six items then five will be reported, followed by  “…”


The format for items within the unknown dictionary simply shows the name and value of each item. An example of how an unknown dictionary is displayed is shown above in the dictionary stack part of the report.


The dictionary stack shows the dictionaries which were open at the time the offending command was called. The dictionary reported first was the top on the stack. The format of these reports follows that described above for the operand stack except that the type field is omitted because all entries are assumed to be dictionaries.

The execution stack shows those operators, files, procedures and parts of procedures which were queued for execution when the error occurred. The stack is automatically truncated so as not to show parts of the full stack which are within the error handler itself or in the server loop. Those parts will not be relevant to determining the cause of a problem in a job or page feature. The truncation used will always ensure that the final entry is the stopped operator from the server loop.

The file stack shows all the files in the execution stack in more detail. The type of each file is reported, together with whether it is open or closed and the line and byte within the file to which it had been read when the error occurred.

File type may be:

realfile – opened with the file operator on an ordinary device.

editfile – either %lineedit% or %statementedit% . This will only ever be seen while running the executive.

filterfile – opened with the filter operator.

stdfile – the file is open on one of the pseudo-devices %stdin% , %stdout% or %stderr% .

The next 128 characters after the point to which the interpreter had read the file are then displayed if the file is open and not an editfile.

An equivalent short format report would resemble the following:


TEXT
  ****************** ERROR HANDLER REPORT (Short format)
  ****************** ERROR: /undefined OFFENDING COMMAND: wibble
  OPERAND STACK: 4
  ****0:(realtype) 27.6667
  ****1:(booleantype) false
  ****2:(integertype) 0
  FILE STACK:
  ****:"%EP12Quadra950%ErrorJob.PS" realfile, open, line: 507, byte: 24668
  **FOLLOWING LINES:
  %%EndDocumentSetup
  %%Page: ? 1 op
  0 xl
  1 pen
  0 gm
  (nc 0 0 1584 1080 6 rc)kp
  0.64314 0 0.24705 setrgbcolor
  1 xppen
  0 xps
  Job Not Completed: HX3fx; document: MT class page


In the default short format report the header is reduced to the error and the offending command. Only the first three items on the operand stack are shown, and the dictionary and execution stack are completely suppressed. Only the first file in the file stack is reported.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.