mirror of https://gitee.com/bigwinds/arangodb
added log of exception
This commit is contained in:
parent
1493f911eb
commit
c577193ae4
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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),
|
||||
|
|
Loading…
Reference in New Issue