Adds further ext deps as-is binaries copies from customers env.
Qt6 Migration CI / migrate (push) Canceled after 0s

This commit is contained in:
torsten committed 2026-10-23 16:13:31 +00:00
1 parent 48129fdab2
commit 48d9b9bd49
3700 files changed
+2132394

No files matched your search

+44
View File
@@ -0,0 +1,44 @@
#pragma once
#include <exception>
#include <functional>
#include <vector>
namespace ddkit {
namespace utils {
namespace exceptions {
class GlobalHandler {
public:
template<typename Exception> static void registerHandler(std::function<void(Exception&)> handler){
instance().m_registeredHandlers.push_back([handler](std::exception_ptr exceptionPtr){
try {
std::rethrow_exception(exceptionPtr);
} catch (Exception& e) {
handler(e);
} catch (...){
// NO OP
}
});
}
static void registerHandler(std::function<void(std::exception_ptr)> handler){
instance().m_registeredHandlers.push_back(handler);
}
private:
std::terminate_handler m_previousHandler;
std::vector<std::function<void(std::exception_ptr)>> m_registeredHandlers;
GlobalHandler();
void handleException(const std::exception_ptr&);
static GlobalHandler& instance();
static void terminateHandler();
};
} // namespace exceptions
} // namespace utils
} // namespace ddkit