Well you obviously need to catch the error raised on the javascript side
and not on the c++ side
try {
document.write('foo');
} catch (e) {
//handle error
} finally {
//cleanup
}
var str = 'hello' + 'world';
On Friday, November 8, 2013 9:56:23 AM UTC+2, Michael demiGod wrote:
>
> script:
>
> 1 document.write('foo');
>
> 2 var str = 'hello' + 'world';
>
> 3 ...
>
>
> cpp:
>
> v8::TryCatch try_catch;
>
> v8::Handle result = script->Run();
>
>
> result:
>
> test.js:1: Uncaught ReferenceError: document is not defined
>
>
> Although I can use v8::trycatch to get exception info, I'll miss the
> following script.
>
> Is there any way to continue running script and get 'helloworld', ignoring
> the Uncaught ReferenceError of first line?
>
--
--
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/groups/opt_out.