13 class NARCLOG_API MethodExceptionHandler final
15 friend class ExceptionHandlerBuilder;
18 ~MethodExceptionHandler();
21 int execute(
const std::function<
void()>& method);
24 explicit MethodExceptionHandler(
const std::function<
void()>& function,
25 const std::function<
void()>& finallyCallback);
27 const std::function<void()> m_function;
28 const std::function<void()> m_finallyCallback;
30 bool m_handleAllNonFatalExceptionAsFatal =
false;
31 bool m_rethrowFatal =
false;
33 const char* m_name =
nullptr;
36 void errorExceptionHandler(
const std::exception& e)
const;
37 GETTER std::string format(
const std::exception& e)
const;
38 GETTER std::string format(
const std::exception& e,
const std::string& handlerName)
const;