diff --git a/CInterface/Core.cpp b/CInterface/Core.cpp index c097023..beca1ae 100644 --- a/CInterface/Core.cpp +++ b/CInterface/Core.cpp @@ -1,4 +1,4 @@ #include "Core.hpp" std::string ExceptionHandler::_lastException = ""; -export const char* GetLastException() { return ExceptionHandler::GetLastException(); } +export const char* CreatureLib_C_GetLastException() { return ExceptionHandler::GetLastException(); } diff --git a/CInterface/Core.hpp b/CInterface/Core.hpp index 966e3ed..76e5995 100644 --- a/CInterface/Core.hpp +++ b/CInterface/Core.hpp @@ -6,6 +6,8 @@ #include #define export extern "C" +#define CreatureLibException 1; + class ExceptionHandler { static std::string _lastException; @@ -20,7 +22,7 @@ public: return 0; \ } catch (const std::exception& e) { \ ExceptionHandler::SetLastException(e); \ - return 1; \ + return CreatureLibException; \ } #endif // CREATURELIB_CORE_HPP