I am trying to throw and exception from inside a pmc so I have this handler
.sub _handler $S1 = P5["_message"] if $S1 == "Myexception" goto l1 rethrow P5 l1: .pcc_begin_return .return P5 .pcc_end_return .end
registrered like this
.local Exception_Handler hndl
newsub hndl, .Exception_Handler, _handler
set_eh hndl
and I try to thow the exception like this
PMC* excp = pmc_new(INTERP, enum_class_Exception);
PMC* key = key_new_string(INTERP, string_from_cstring(INTERP, "_message",0));
VTABLE_set_string_keyed(INTERP,excp, key,
string_from_cstring(INTERP, "Myexception", 0));
throw_exception(INTERP, excp, (void*)0);
but this doesnt work
how should I do this I cant seem to find any documentation on this or any other pmc that does it
Tor Petterson