From 4e671188a3ccaa387ab98a73fb2ee569478a3a72 Mon Sep 17 00:00:00 2001 From: Nicolas Noble Date: Wed, 24 Jul 2013 14:23:47 -0700 Subject: Better exception handling support for Lua. --- Balau | 2 +- src/Dalos-cli.cc | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Balau b/Balau index e37ef65..712b4be 160000 --- a/Balau +++ b/Balau @@ -1 +1 @@ -Subproject commit e37ef65aaa42e790a741c15dbae9b83e9c04cd3a +Subproject commit 712b4bed9973c60b5c139f98e51ed804ce8a628d 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 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(); } } -- cgit v1.2.3