summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--project2/common/taskHost.cpp1
-rw-r--r--project2/console/consoleAppEngine.cpp22
2 files changed, 19 insertions, 4 deletions
diff --git a/project2/common/taskHost.cpp b/project2/common/taskHost.cpp
index 502e273..fa4718b 100644
--- a/project2/common/taskHost.cpp
+++ b/project2/common/taskHost.cpp
@@ -33,6 +33,7 @@ TaskHost::execute() const
}
catch (...) {
rollbackAll();
+ throw;
}
}
diff --git a/project2/console/consoleAppEngine.cpp b/project2/console/consoleAppEngine.cpp
index e49825f..ef1a04f 100644
--- a/project2/console/consoleAppEngine.cpp
+++ b/project2/console/consoleAppEngine.cpp
@@ -1,4 +1,6 @@
#include <pch.hpp>
+#include <glibmm/exception.h>
+#include <cxxabi.h>
#include "consoleAppEngine.h"
#include "consoleEnvironment.h"
#include "safeMapFind.h"
@@ -35,10 +37,22 @@ onCheckFailureHelper(boost::intrusive_ptr<const ParamChecker> pc)
void
ConsoleApplicationEngine::process() const
{
- runChecks();
- execute();
- executeViews(boost::bind(&PresenterLoader::createFrom, LoaderBase::getLoader<PresenterLoader, NotSupported>("console"), _1));
- addAppData(headPresenter().get());
+ try {
+ runChecks();
+ execute();
+ executeViews(boost::bind(&PresenterLoader::createFrom, LoaderBase::getLoader<PresenterLoader, NotSupported>("console"), _1));
+ addAppData(headPresenter().get());
+ }
+ catch (const std::exception & e) {
+ char * buf = __cxxabiv1::__cxa_demangle(typeid(e).name(), NULL, NULL, NULL);
+ Logger()->messagef(LOG_ERR, "%s: Script errored: %s: %s", __FUNCTION__, buf, e.what());
+ free(buf);
+ }
+ catch (const Glib::Exception & e) {
+ char * buf = __cxxabiv1::__cxa_demangle(typeid(e).name(), NULL, NULL, NULL);
+ Logger()->messagef(LOG_ERR, "%s: Script errored: %s: %s", __FUNCTION__, buf, e.what().c_str());
+ free(buf);
+ }
}
const Environment *