1
0
Fork 0

Fix exit code of arangosh if a script threw an exception - meanwhile the TryCatch is also inside.

This commit is contained in:
Wilfried Goesgens 2015-11-10 19:02:30 +01:00
parent 79a541d89d
commit 7780b48539
1 changed files with 4 additions and 1 deletions

View File

@ -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();