Index | PAL Intro | Commands | Registers | Indices | Stack | Macros | Classes | Attributes | Errors
error/def - Define a new error type
Synopsis
Description
Error Handling
Examples
See Also
Author
error/def [name]
error/def [name], [desc]
Creates a new error type object underneath .prose.error.module_name, where module_name is the name of the current module.
The name argument provides the name of the error node to create, and the desc argument provides an optional description of the error.
The name may be a dot-separated path if the node is to be created underneath a subcontainer. If the path doesnt already exist, it will be created. If a dot needs to be used in a name then prefix it with a backslash character (\).
If desc is a register containing the type PSUNIT_TYPE_STRING and the instruction does not generate an error, then the register will be cleared as the byte string is now referenced by the new error type object.
A runtime error occurs if the arguments are the wrong type.
error/def [ArrayTooBig], [Not enough memory for array operation] Creates a new module error called ArrayTooBig.
pal_commands(5), pal_indices(5), ps_errortypes(5), error_now(5),
PROSE Assembly Language at prose.sourceforge.net.
Copyright (c) 2002-2013 Mark R. Bannister <cambridge@users.sourceforge.net>.
This is free software and can be downloaded from prose.sourceforge.net; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
PAL 1.0 | error_def (5) | 8 March 2013 |