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 Default: |
HqnShowFollowing | (Integer) If positive, show the following lines section in the file stack with this number of bytes. Set to Default: |
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 Default: |
HqnShowSubStrings | (Integer) Set the maximum length of strings (in bytes) to show in for strings inside arrays or in the dictionary stack list. Default: |
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 Default: |
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 Default: |
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: |
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: |
Set how various classes of characters should be shown in strings:
HqnNormalChars | Normal ASCII' (<20>-<FE>) Default: |
HqnPrintControls | “Useful” control bytes (BT, CR, LF) Default: |
HqnControlChars | Other low-byte characters (<00>-<1F> and <7F>, excluding HT, CR and LF) Default: |
HqnHighByte | High-byte characters (<80>-<FF>) in non-UTF-8-compliant strings. Default: |
HqnUTF8 | High-byte characters (<80>-<FF>) in UTF-8-compliant strings. Default: |
Values of each should be:
| Just show the character for that byte in the current font. |
| Replace with a dot (“.”) |
| Report in octal with a leading “\” character |
| Report as a block of two hex digits, surrounded by “<“ and “>” |
| The whole string should be shown as a hex string if any relevant bytes occur. |
| 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.