1
0
Fork 0

added log of exception

This commit is contained in:
Frank Celler 2014-09-15 23:18:10 +02:00
parent 1493f911eb
commit c577193ae4
2 changed files with 9 additions and 0 deletions

View File

@ -223,11 +223,19 @@ void ApplicationV8::V8Context::handleGlobalContextMethods () {
bool allowUseDatabase = v8g->_allowUseDatabase;
v8g->_allowUseDatabase = true;
v8::TryCatch tryCatch;
TRI_ExecuteJavaScriptString(_context,
v8::String::New(func.c_str(), (int) func.size()),
v8::String::New("global context method"),
false);
if (tryCatch.HasCaught()) {
if (tryCatch.CanContinue()) {
TRI_LogV8Exception(&tryCatch);
}
}
v8g->_allowUseDatabase = allowUseDatabase;
}
}

View File

@ -3483,6 +3483,7 @@ static v8::Handle<v8::Value> ExecuteQueryNativeAhuacatl (TRI_aql_context_t* cont
}
TRI_ASSERT(codeLength > 0);
// execute code
v8::Handle<v8::Value> result = TRI_ExecuteJavaScriptString(v8::Context::GetCurrent(),
v8::String::New(code, (int) codeLength),