summaryrefslogtreecommitdiff
path: root/src/Dalos-cli.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Dalos-cli.cc')
-rw-r--r--src/Dalos-cli.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/Dalos-cli.cc b/src/Dalos-cli.cc
index ae4806c..acc7ea3 100644
--- a/src/Dalos-cli.cc
+++ b/src/Dalos-cli.cc
@@ -104,6 +104,16 @@ void MainTask::Do() {
LuaExecString luaExecString(line_read);
luaExecString.exec(luaMainTask);
- luaExecString.throwError();
+ try {
+ luaExecString.throwError();
+ }
+ catch (GeneralException & e) {
+ const char * details = e.getDetails();
+ if (details)
+ Printer::log(M_WARNING, " %s", details);
+ auto trace = e.getTrace();
+ for (String & str : trace)
+ Printer::log(M_DEBUG, "%s", str.to_charp());
+ }
}
}