| parrotcode: Exceptions | |
| Contents | C |

src/exceptions.c - Exceptions

Define the the core subsystem for exceptions.

PMC *Parrot_ex_build_exceptionvoid die_from_exceptionexception,
a message if there is one,
and then exit.
void Parrot_ex_add_c_handleropcode_t *Parrot_ex_throw_from_opvoid Parrot_ex_throw_from_cexit_fatal(),
which signals fatal errors,
and Parrot_ex_throw_from_op.The 'invoke' vtable function doesn't actually execute a sub/continuation/handler,
it only sets up the environment for invocation and returns the address of the start of the sub's code.
That address then becomes the next op in the runloop.Exceptions thrown from C and caught by a continuation-based handler are resumable at the level of a C instruction.
When handled,
they return the exception object.
Any values returned from the handler to the C code that threw the exception can be stored in the exception's payload.
opcode_t *Parrot_ex_throw_from_op_argsParrot_ex_throw_from_c,
Parrot_ex_throw_from_op,
and exit_fatal().
void Parrot_ex_throw_from_c_argsret_addr is the address from which to resume,
if some handler decides that is appropriate,
or zero to make the error non-resumable.
exitcode is a exception_type_enum value.See also Parrot_ex_throw_from_c,
Parrot_ex_throw_from_op,
and exit_fatal().
opcode_t *Parrot_ex_rethrow_from_opvoid Parrot_ex_rethrow_from_cnew_c_exception.
void Parrot_ex_mark_unhandledsize_t Parrot_ex_calc_handler_offset
void Parrot_assertvoid Parrot_confessvoid Parrot_print_backtraceParrot_confess.
void exit_fatalexit to exit the process with the given exitcode.
It is not possible for Parrot bytecode to intercept a fatal error (for that,
use Parrot_ex_throw_from_c_args).
exit_fatal does not call Parrot_exit to invoke exit handlers (that would require an interpreter).
void do_panic
include/parrot/exceptions.h.
|
|
|