Thanks Ben.  I saw it and was thinking that could be my last resort.

Does terminateExecution tear down the isolate or just terminate execution 
of one script?  Do my cached persistent handles survive a 
terminateExecution?

On Thursday, June 26, 2014 12:21:03 AM UTC-7, Ben Noordhuis wrote:
>
> On Thu, Jun 26, 2014 at 6:53 AM, Jane Chen <[email protected] 
> <javascript:>> wrote: 
> > I need a way to throw an exception from a function callback.  For this 
> type 
> > of exception, I don't want the script to catch it, but instead, I'd like 
> v8 
> > to throw it out to my system so that I can catch it and re-run the 
> script. 
> > Does v8 provide such an API?  If not, is there some kind of work-around 
> I 
> > could use? 
> > 
> > I'm on 3.24 but could upgrade to trunk if needed. 
>
> V8::TerminateExecution() in combination with 
> V8::CancelTerminateExecution()?  They're available in 3.24.  You can 
> discriminate between a regular exception and a termination exception 
> with TryCatch::HasTerminated(). 
>
> Caveat emptor, a termination exception is not immediately active.  See 
> this thread[1] for details and a workaround. 
>
> [1] https://groups.google.com/forum/#!topic/v8-users/SpzuB-lTgcI 
>

-- 
-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to