Skip to main content
Skip table of contents

Error handler configuration

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


Current configuration options are:

longErrorReport

A Boolean which should be true if a complete stack report is required or false if only the top few items on the operand stack should be displayed and reporting of dictionary, execution and file stacks should be suppressed.

fullDictReport

An integer which defines the largest dictionary which will be fully reported if its name cannot be determined. See the description of the operand stack in The error handler report for more information.

HqnShowOperand

HqnShowDictionary

HqnShowExecution

HqnShowFiles

(Boolean) Set these to true to show or false to disable the individual stack information reports.

Default: true

HqnShowFollowing

(Integer) If positive, show the following lines section in the file stack with this number of bytes. Set to 0 to suppress that section.

Default: 512

HqnShowStrings

(Integer) Set the maximum length of strings (in bytes) to show in the operand stack. Any string over this length will be truncated and displayed with “...” after it. Use -1 for no limit.

Default: 128

HqnShowSubStrings

(Integer) Set the maximum length of strings (in bytes) to show in for strings inside arrays or in the dictionary stack list.

Default: 64

HqnResolveURLPercent

(Boolean) If the string contains any 3-byte sequences matching the percent escape used in URLs (for example, “%20” for a space) they will be resolved to the referenced byte value before display, and the string will be prefixed with “P:” if this is true .

Default: false

HqnShowArrays

(Integer) Set the maximum number of bytes to show of Arrays in the operand stack. Any array (executable or literal) over this length will be truncated and displayed with '...' after it. Use -1 for “no limit”

Default: 768

HqnShowDictArrays

(Integer) Set the maximum number of bytes to show of Arrays in the dictionary stack list and in dictionaries in the operand list:

Default: 256

HqnShowExecTop

HqnShowExecBase

(Boolean) The top and bottom of the execution stack are usually suppressed because they do not provide valuable information. Occasionally, the determination of where the relevant portion of the stack is can be incorrect. These switches allow the whole execution stack to be shown.

Default: false


Set how various classes of characters should be shown in strings:

HqnNormalChars

Normal ASCII' (<20>-<FE>)

Default: raw

HqnPrintControls

“Useful” control bytes (BT, CR, LF) Default: raw

HqnControlChars

Other low-byte characters (<00>-<1F> and <7F>, excluding HT, CR and LF)

Default: allhex

HqnHighByte

High-byte characters (<80>-<FF>) in non-UTF-8-compliant strings. Default: raw

HqnUTF8

High-byte characters (<80>-<FF>) in UTF-8-compliant strings. Default: hex


Values of each should be:

raw

Just show the character for that byte in the current font.

dot

Replace with a dot (“.”)

oct

Report in octal with a leading “\” character

hex

Report as a block of two hex digits, surrounded by “<“ and “>”

allhex

The whole string should be shown as a hex string if any relevant bytes occur.

unihex

Only valid as the value of HqnUTF8. Convert multi-byte UTF-8 sequences to a Unicode code point, and report that as a block of 4 hex digits, surrounded by “<“ and “>”.


These options must be passed to a call to LoadErrorHandler in the preceding dictionary. In addition, the recordstacks entry in the $error dictionary will be acted on.

If the print operator has been re-defined then output may be redirected to other text channels, or even printed on the output medium if required. Such re-definitions must be done using shadowop in order to act on the bound instances of print in the error handling routines.

JavaScript errors detected

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

If this problem persists, please contact our support.