2020-07-19 09:08:05 +00:00
|
|
|
#include "Core.hpp"
|
2020-08-18 16:41:18 +00:00
|
|
|
#include "../src/SignalHandling.hpp"
|
2020-07-19 09:08:05 +00:00
|
|
|
|
2020-09-25 10:31:37 +00:00
|
|
|
/// @file
|
|
|
|
|
2020-07-28 17:24:35 +00:00
|
|
|
std::string ExceptionHandler::_ArbutilsLastException = "";
|
2020-09-25 10:31:37 +00:00
|
|
|
/// @brief Returns a null-terminated C string to the last exception found.
|
2022-04-01 10:05:48 +00:00
|
|
|
export_func const char* Arbutils_C_GetLastException() { return ExceptionHandler::GetLastException(); }
|
2020-08-18 16:41:18 +00:00
|
|
|
|
2020-10-18 15:18:27 +00:00
|
|
|
#if !WINDOWS && SIGNAL_HANDLING
|
2020-08-18 16:41:18 +00:00
|
|
|
static ArbUt::SignalHandling sh;
|
2020-09-25 10:31:37 +00:00
|
|
|
/// @brief Sets a callback to a function to run when a signal occurs.
|
2020-08-18 17:15:00 +00:00
|
|
|
export void Arbutils_C_SetSignalCallback(void (*callback)(const char*)) { sh.SetCallback(callback); }
|
2020-08-20 11:10:10 +00:00
|
|
|
#else
|
2020-10-23 14:52:22 +00:00
|
|
|
/// @brief Sets a callback to a function to run when a signal occurs.
|
2022-04-01 10:05:48 +00:00
|
|
|
export_func void Arbutils_C_SetSignalCallback(void (*)(const char*)) { }
|
2020-08-20 11:10:10 +00:00
|
|
|
#endif
|