On Sun, Nov 24, 2013 at 9:35 AM, Gregory Hlavac <[email protected]> wrote:
> d:\trsdependencies\v8trunk\src\contexts.cc (47):
> v8::internal::Context::builtins
> d:\trsdependencies\v8trunk\src\execution.cc (634):
> v8::internal::Execution::ToString
> d:\trsdependencies\v8trunk\src\api.cc (2690): v8::Value::ToString
> c:\trs\trstrunk\trunk\game\exceptionutility.cpp (89):
> ExceptionUtility::reportException
>
> On SVN Revision 17984
>
> And here's the code.
>
> void reportException(Isolate* iso, const TryCatch& tryCatch)
> {
> path logScriptDirectory = path("logs/script");
>
> if((exists(logScriptDirectory) && is_directory(logScriptDirectory)) ||
> create_directories(logScriptDirectory))
> {
> HandleScope scope(iso);
>
> Handle<Message> msg = tryCatch.Message();
>
> if(!msg.IsEmpty())
> {
> string srcLine = *String::AsciiValue(msg->GetSourceLine()); // RIGHT HERE?
> }
> }
> }

Check that the return value from v8::Message::GetSourceLine() is not
an empty handle, i.e. that msg->GetSourceLine().IsEmpty() == false.
v8::String::AsciiValue::operator*() returns NULL when the handle is
empty.

-- 
-- 
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.

Reply via email to