harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pavel Afremov" <pavel.n.afre...@gmail.com>
Subject Re: [drlvm][exceptions] want to use exn_raise_by_name but using exn_create/exn_raise_object instead
Date Mon, 11 Dec 2006 10:27:10 GMT
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 <alexei.fedotov@gmail.com> 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
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message