summaryrefslogtreecommitdiff
path: root/fxjs
diff options
context:
space:
mode:
Diffstat (limited to 'fxjs')
-rw-r--r--fxjs/cfxjse_context.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/fxjs/cfxjse_context.cpp b/fxjs/cfxjse_context.cpp
index 03bcc4d6ab..6f2b770bdc 100644
--- a/fxjs/cfxjse_context.cpp
+++ b/fxjs/cfxjse_context.cpp
@@ -293,9 +293,16 @@ bool CFXJSE_Context::ExecuteScript(const char* szScript,
ASSERT(!trycatch.HasCaught());
if (lpRetValue)
lpRetValue->m_hValue.Reset(m_pIsolate, hValue);
+
return true;
}
}
+
+#ifndef NDEBUG
+ v8::String::Utf8Value error(GetIsolate(), trycatch.Exception());
+ fprintf(stderr, "JS Error: %ls\n", WideString::FromUTF8(*error).c_str());
+#endif // NDEBUG
+
if (lpRetValue) {
lpRetValue->m_hValue.Reset(m_pIsolate,
CreateReturnValue(m_pIsolate, trycatch));