warning_exception (<text>, <code> {,<severity>})
exception
A new user exception with details of a user warning.
<text>
The text of the warning, a string value.
<code>
The code of the warning, a numeric value.
Error codes with a value greater than 1000 are reserved for system errors, so this should
be in the range 1 through 999.
<severity>
The severity of the warning, a numeric value in the range 1 through 10.
If omitted, the value 1 is assumed. Via the system numeric
throw_level, try/catch blocks can be
restricted to processing only exceptions below a particular severity. The most serious
errors have the lowest severity value.
There are 3 styles of exception: error, warning and interrupt. They behave identically and are differentiated only by style for user-analysis purposes.
The exception is initialized with a full command frame stack trace to aid with debugging.
Throw a user warning.
throw warning_exception('The file is read-only',558,10)
Commands: |
|
Functions: |
|
Identifiers: |
throw_level (numeric) |
Structures: |