mirror of https://gitee.com/bigwinds/arangodb
Fix exit code of arangosh if a script threw an exception - meanwhile the TryCatch is also inside.
This commit is contained in:
parent
79a541d89d
commit
7780b48539
|
@ -1728,7 +1728,7 @@ static bool RunScripts (v8::Isolate* isolate,
|
|||
current->ForceSet(TRI_V8_ASCII_STRING("__dirname"), TRI_V8_STRING(dirname));
|
||||
TRI_FreeString(TRI_CORE_MEM_ZONE, dirname);
|
||||
|
||||
TRI_ExecuteGlobalJavaScriptFile(isolate, scripts[i].c_str());
|
||||
ok = TRI_ExecuteGlobalJavaScriptFile(isolate, scripts[i].c_str());
|
||||
|
||||
// restore old values for __dirname and __filename
|
||||
if (oldFilename.IsEmpty() || oldFilename->IsUndefined()) {
|
||||
|
@ -1757,6 +1757,9 @@ static bool RunScripts (v8::Isolate* isolate,
|
|||
ok = false;
|
||||
break;
|
||||
}
|
||||
if (!ok) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
BaseClient.flushLog();
|
||||
|
|
Loading…
Reference in New Issue