Index | PAL Intro | Commands | Registers | Indices | Stack | Macros | Classes | Attributes | Errors
error/now - Generate a new error condition
Synopsis
Description
Error Handling
Examples
See Also
Author
error/now ![objectref]
error/now ![objectref], [desc]
error/now
Generates a new error condition using the error type object identified by the objectref argument, and with an optional custom description provided by the desc text argument.
If no arguments are provided, then a new error condition is created using the details of the last error to have occurred. This is generally used in error handlers to pass on an error that it is actually unable to handle.
If the desc argument 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 data is now referenced elsewhere. The memory taken by the byte string will be released when the error state is cleared by error/clr or, if the error is not trapped, when the thread exits.
A runtime error occurs if the arguments are the wrong type, or if the object pointed to by the first argument does not exist.
error/now ![.prose.error.sys.OutOfMemory], [Cant read data] Generates a new out of memory error condition, with an additional message that says "Cant read data".
pal_commands(5), pal_registers(5), pal_indices(5), ps_errortypes(5), error_def(5), error_clr(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_now (5) | 8 February 2013 |