summaryrefslogtreecommitdiff
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
parenta2eb088a5a4b09e52ab22973498d6370b0315f5c (diff)
Better exception handling support for Lua.
m---------Balau0
-rw-r--r--src/Dalos-cli.cc7
2 files changed, 3 insertions, 4 deletions
diff --git a/Balau b/Balau
-Subproject e37ef65aaa42e790a741c15dbae9b83e9c04cd3
+Subproject 712b4bed9973c60b5c139f98e51ed804ce8a628
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();
}
}