exception handling macros ^

Exception creation can be fairly verbose. These macros provide an API of sorts to the exceptions.

catch () ^

Preamble for any tcl-related exception handler.

rethrow () ^

Re-throw the current exception

get_stacktrace (OUT string message) ^

(XXX) return the stacktrace for the current exception

get_message (OUT string message) ^

Get the simple string message for the current exception.

get_severity (OUT int level) ^

Get the severity level of the current exception.

get_return_code ^

Get the tcl-level code for this exception. (TCL_CATCH, TCL_RETURN), etc. Note that TCL_OK is not one of the options here: that's implied by a normal parrot .return

throw (IN string mess) ^

Given a string, construct and throw a TCL_ERROR.

throw_with_code (IN int code, IN string mess) ^

Throw an arbitrary TCL_ERROR, TCL_CONTINUE, etc, with a given message.

tcl_break () ^

Generate a TCL_BREAK with no message.

tcl_continue () ^

Generate a TCL_BREAK with no message.

tcl_return (IN any value) ^

Generate a TCL_RETURN with the given return value.

Utility methods ^

the implementation of these never change: define them once and just include them.

cloneable () ^

Simplistic implementation of __clone

dumper ^

Utility macro to simplify generating output during debug cycles.

compilation related macros ^

sprintf<N>(OUT str code, IN str format, IN pmc val, ...) ^

This isn't actually a vararg implementation - you can't vararg a macro. Instead, the macro name has a trailing number to indicate how many val arguments it's expecting.


parrot