Skip to content

Commit 6b7cc0d

Browse files
committed
Return non-zero exit value if script fails
1 parent 906f25e commit 6b7cc0d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/auto4_lua.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ namespace {
580580
if (lua_pcall(L, nargs, nresults, -nargs - 2)) {
581581
if (!lua_isnil(L, -1)) {
582582
// if the call failed, log the error here
583-
ps->Log("\n\nLua reported a runtime error:\n");
583+
ps->Log("Lua reported a runtime error:");
584584
ps->Log(get_string_or_default(L, -1));
585585
}
586586
lua_pop(L, 2);
@@ -754,7 +754,7 @@ namespace {
754754
catch (agi::UserCancelException const&) {
755755
subsobj->Cancel();
756756
stackcheck.check_stack(0);
757-
return;
757+
throw;
758758
}
759759

760760
auto lines = subsobj->ProcessingComplete(StrDisplay(c));

0 commit comments

Comments
 (0)