summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNicolas Noble <nnoble@blizzard.com>2013-07-24 14:23:47 -0700
committerNicolas Noble <nnoble@blizzard.com>2013-07-24 14:23:47 -0700
commit4e671188a3ccaa387ab98a73fb2ee569478a3a72 (patch)
tree2c6207a93c51c08ea6f545d88a1f29d78e0bf6cc /src
parenta2eb088a5a4b09e52ab22973498d6370b0315f5c (diff)
Better exception handling support for Lua.
Diffstat (limited to 'src')
-rw-r--r--src/Dalos-cli.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Dalos-cli.cc b/src/Dalos-cli.cc
index 89069bf..dd0a4a8 100644
--- a/src/Dalos-cli.cc
+++ b/src/Dalos-cli.cc
@@ -74,16 +74,14 @@ void MainTask::Do() {
IO<Input> file(new Input(argv[optind++]));
LuaExecFile luaExecFile(file);
luaExecFile.exec(luaMainTask);
- if (luaExecFile.gotError())
- return;
+ luaExecFile.throwError();
}
for (auto & exec : execs) {
todo = true;
LuaExecString luaExecString(exec);
luaExecString.exec(luaMainTask);
- if (luaExecString.gotError())
- return;
+ luaExecString.throwError();
}
if (!todo && !interactive)
@@ -105,5 +103,6 @@ void MainTask::Do() {
LuaExecString luaExecString(line_read);
luaExecString.exec(luaMainTask);
+ luaExecString.throwError();
}
}