X-Git-Url: https://git.toastfreeware.priv.at/toast/confclerk.git/blobdiff_plain/3329d3936b567d40a56de5ca3347d0416cf098f4..080dc7d603d45ba0662aa731418993ddd45b5fe8:/src/app/application.cpp
diff --git a/src/app/application.cpp b/src/app/application.cpp
index 29a0148..8bf23a8 100644
--- a/src/app/application.cpp
+++ b/src/app/application.cpp
@@ -1,25 +1,31 @@
/*
* Copyright (C) 2010 Ixonos Plc.
+ * Copyright (C) 2011-2024 Philipp Spitzer, gregor herrmann, Stefan Stahl
*
- * This file is part of fosdem-schedule.
+ * This file is part of ConfClerk.
*
- * fosdem-schedule is free software: you can redistribute it and/or modify it
+ * ConfClerk is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, either version 2 of the License, or (at your option)
* any later version.
*
- * fosdem-schedule is distributed in the hope that it will be useful, but
+ * ConfClerk is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
- * fosdem-schedule. If not, see .
+ * ConfClerk. If not, see .
*/
+#if defined(__GNUC__) || defined(__llvm__) || defined(__clang__)
+#include
+#endif
+#include
+
#include "application.h"
#include "errormessage.h"
-#include
+#include "ormrecord.h"
// if the application uses exceptions,
// there is always a possibility that some will leak uncached from event handler
@@ -31,8 +37,21 @@ bool Application::notify(QObject* receiver, QEvent* event)
} catch (OrmException& e) {
error_message("UNCAUGHT OrmException: " + e.text());
return false;
+ } catch (std::exception& e) {
+ error_message("UNCAUGHT exception: " + QString(e.what()));
+ return false;
} catch (...) {
- error_message("UNCAUGHT EXCEPTION: unknown");
+#if defined(__GNUC__) || defined(__llvm__) || defined(__clang__)
+ int status = 0;
+ char *buff = __cxxabiv1::__cxa_demangle(
+ __cxxabiv1::__cxa_current_exception_type()->name(),
+ NULL, NULL, &status);
+ QString exception_name = QString(buff);
+ std::free(buff);
+#else
+ QString exception_name = QString("unknown");
+#endif
+ error_message("UNCAUGHT exception: " + exception_name);
return false;
}
}