Yes, that's what my function does - returns via ThrowException. But it
returns not to js, but to my calling code. Then my calling code needs
to know if the returned Value is returned via ThrowException, and if
it is, return this value to Js immediately. I guess ThrowException
just sets some flag in the context, that tells v8 to treat the value
returned by the native call as exception. Basically, I need a way to
check this flag, or something like this.


On Mar 16, 9:35 am, Stephan Beal <[email protected]> wrote:
> 2012/3/16 javamonk <[email protected]>
>
> > You can throw exception by return this:
> > return
> > v8::ThrowException(v8::Exception::Error(v8::String::New("message
> > here..")));
>
> Triva: you can throw ANY JS Value:
>
>   return v8:ThrowException(v8::String::New("..."))
>
> once upon a time i thought that ThrowException generated an Error object
> from its arguments, but it does not.
>
> --
> ----- stephan 
> bealhttp://wanderinghorse.net/home/stephan/http://gplus.to/sgbeal

-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users

Reply via email to