Arbutils/CInterface/Core.cpp

14 lines
559 B
C++
Raw Normal View History

#include "Core.hpp"
2020-08-18 16:41:18 +00:00
#include "../src/SignalHandling.hpp"
std::string ExceptionHandler::_ArbutilsLastException = "";
export const char* Arbutils_C_GetLastException() { return ExceptionHandler::GetLastException(); }
2020-08-18 16:41:18 +00:00
#if !WINDOWS
2020-08-18 16:41:18 +00:00
static ArbUt::SignalHandling sh;
2020-08-18 17:15:00 +00:00
export void Arbutils_C_SetSignalCallback(void (*callback)(const char*)) { sh.SetCallback(callback); }
2020-08-18 16:41:18 +00:00
export void Arbutils_C_RaiseSignal() { raise(SIGSEGV); }
#else
2020-08-20 11:21:39 +00:00
export void Arbutils_C_SetSignalCallback(void (*)(const char*)) { }
export void Arbutils_C_RaiseSignal() { raise(SIGSEGV); }
#endif