parrotcode: Exception PMC | |
Contents | PMCs |
src/pmc/exception.pmc - Exception PMC
This is the exception base class. An exception object has the following attributes:
message
severity
type
exit_code
handled
payload
When an exception handler is called,
the exception object is passed as as the first argument,
the message as the second argument of the call.
These arguments can be retrieved with the get_results
opcode.
void init()
void mark()
void destroy()
STRING *get_string()
INTVAL get_integer()
STRING *get_string_keyed(PMC *key)
*key
.
The only current recognized key
is "message".INTVAL get_integer_keyed(PMC *key)
*key
.INTVAL get_integer_keyed_str(STRING *key)
*key
.PMC *get_pmc_keyed(PMC *key)
*key
.void set_string_native(STRING *value)
message
of the Exception.void set_integer_native(INTVAL *value)
id
of the Exception.void set_number_native(FLOATVAL value)
void set_string_keyed(PMC *key, STRING *value)
*key
.void set_integer_keyed(PMC *key, INTVAL value)
*key
.void set_integer_keyed_str(STRING *key, INTVAL value)
*key
.void set_pmc_keyed(PMC *key, PMC *value)
*key
.void set_pointer(void *context)
void *get_pointer()
INTVAL is_equal(PMC *value)
SELF
.
Returns true if SELF
and value
are the same type,
and have the same values for type,
severity,
and exit_code.get_attr_str
set_attr_str
PMC *share_ro()
|