summaryrefslogtreecommitdiff
path: root/src/helpers/MiscFunctions.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2023-08-20 11:47:06 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2023-08-20 11:47:06 +0200
commit7713daa86adf7980fd73cae40203ab6deb6be8b8 (patch)
treed30076975a2011519e7007fbc8265605f8fe02bb /src/helpers/MiscFunctions.cpp
parentfff118fa763d299958002684d2fdbfbb2e804d50 (diff)
compositor: log thrown runtime exceptions
Diffstat (limited to 'src/helpers/MiscFunctions.cpp')
-rw-r--r--src/helpers/MiscFunctions.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/helpers/MiscFunctions.cpp b/src/helpers/MiscFunctions.cpp
index acda2abd..7bf254ea 100644
--- a/src/helpers/MiscFunctions.cpp
+++ b/src/helpers/MiscFunctions.cpp
@@ -714,3 +714,8 @@ std::vector<SCallstackFrameInfo> getBacktrace() {
return callstack;
}
+
+void throwError(const std::string& err) {
+ Debug::log(CRIT, "Critical error thrown: %s", err.c_str());
+ throw std::runtime_error(err);
+}