| parrotcode exception PMC | |
| Docs | FAQ | Download | Examples | Talks | Resources | Perl 6 | Languages | Who's Who | Donors | Cage Cleaners | Wiki | |
src/pmc/exception.pmc - Exception PMC
This is the exception base class.
For now,
this class is based on ResziablePMCArray.
This will change when the full PMC PDD is implemented.
An exception object has these attributes:
_messageTextual representation of the exception.
_typeThe exception type, (see include/parrot/exceptions.h, except_type.pasm).
_severityThe severity of the exception, (see src/exceptions.h, except_severity.pasm).
payloadAdditional data for the exception.
unusedOptional:
_C_fileThe C code file in which the exception was raised.
_C_lineThe line of C code on which the exception was raised.
_P_fileThe PASM/PIR/Perl file in which the exception was raised.
_P_lineThe line of PASM/PIR/Perl code on which the exception was raised.
unusedAny information attached by the HL. This shouldn't start with an underscore (that is reserved for Parrot's internal usage. These are stored as properties.
Note: currently, HLL information must be indexed by number. Slots 9 and 10 are available for the HLL - This is subject to change.
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()Initializes the exception with default values.
STRING *get_string_keyed(PMC *key)Returns the Parrot string value for *key.
The only current recognized key is "_message".
STRING *get_string()Return the exception message.
INTVAL get_integer_keyed(PMC *key)Returns the integer value for *key.
PMC *get_pmc_keyed(PMC *key)Returns the PMC value for *key.
PMC *get_pmc_keyed_int(INTVAL key)Returns the PMC value of the element at index key,
but ignores too big negative keys.
void set_string_keyed(PMC *key,
STRING *value)Sets the Parrot string value for *key.
void set_integer_keyed(PMC *key,
INTVAL value) Sets the integer value for *key.
void set_pmc_keyed(PMC *key,
PMC *value)Sets the PMC value for *key.
INTVAL is_equal(PMC *value)Compare the passed in Exception with SELF.
Returns True if SELF isa value
get_attr_strRetrieve an attribute value for the exception object.
set_attr_strSet an attribute value for the exception object.
shift_*,
unshift_*,
pop_*,
push_*These methods are silently ignored.
Initial revision by leo 2003.07.10.
|
Perl.org sites
: bugs
| dev
| history
| jobs
| learn
| lists
| use
Site Information and Contacts |
|