v8::TryCatch tc;
v8::ThrowException(v8::Exception::Error(v8::String::New("test")));
printf("%d\n", tc.HasCaught());
prints 0
On Dec 2, 2010, at 3:46 AM, Ben Noordhuis wrote:
> On Thu, Dec 2, 2010 at 12:30, Joshua Kifer <[email protected]> wrote:
>> I am not executing any scripts. I'm am calling ThrowException from C++.
>>
>> I tried using TryCatch but it only appears to capture exceptions within a
>> script. HasCaught() returned false.
>
> The TryCatch object should be defined before calling the throwing
> function. Post or gist your code if you still run into issues.
>
> --
> v8-users mailing list
> [email protected]
> http://groups.google.com/group/v8-users
--
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users