Arbutils/CInterface/Core.cpp

14 lines
559 B
C++

#include "Core.hpp"
#include "../src/SignalHandling.hpp"
std::string ExceptionHandler::_ArbutilsLastException = "";
export const char* Arbutils_C_GetLastException() { return ExceptionHandler::GetLastException(); }
#if !WINDOWS
static ArbUt::SignalHandling sh;
export void Arbutils_C_SetSignalCallback(void (*callback)(const char*)) { sh.SetCallback(callback); }
export void Arbutils_C_RaiseSignal() { raise(SIGSEGV); }
#else
export void Arbutils_C_SetSignalCallback(void (*)(const char*)) { }
export void Arbutils_C_RaiseSignal() { raise(SIGSEGV); }
#endif