Hi. To throw exception you should use exn_throw_by_name. As I understand You'd like to raise exception. You can do it, but the function exn_raise_by_name has parameter "const char *", so string must be constant. You can create string object, store pointer to object in "local_handler" and use it . Also you can create exception by exn_create and raise it by exn_raise_object.
Pavel Afremov. On 12/8/06, Alexei Fedotov <[EMAIL PROTECTED]> wrote:
Pavel (Afremov), All, I'm trying to throw an exception from compile_me stub. I've noticed that exn_raise_by_name just stores exception message in TLS. How can I free memory which I've allocated for this exception message? Currently I'm using exn_create/exn_raise_object pair, because if I understand correctly it copies char* message to the java object, and I can free memory right after exception is created. -- With best regards, Alexei, Intel
