diff --git a/CInterface/Core.cpp b/CInterface/Core.cpp index b8aaaa8..70b51cf 100644 --- a/CInterface/Core.cpp +++ b/CInterface/Core.cpp @@ -1,4 +1,4 @@ #include "Core.hpp" -std::string ExceptionHandler::_lastException = ""; +std::string ExceptionHandler::_pkmnLibLastException = ""; export const char* PkmnLib_C_GetLastException() { return ExceptionHandler::GetLastException(); } \ No newline at end of file diff --git a/CInterface/Core.hpp b/CInterface/Core.hpp index 780c678..fc57421 100644 --- a/CInterface/Core.hpp +++ b/CInterface/Core.hpp @@ -6,15 +6,14 @@ #include #define export extern "C" -// CreatureLibException is 1, so use 2. -#define PkmnLibException 2 +#define PkmnLibException 4 class ExceptionHandler { - static std::string _lastException; + static std::string _pkmnLibLastException; public: - static void SetLastException(const std::exception& e) { _lastException = std::string(e.what()); } - static const char* GetLastException() { return _lastException.c_str(); } + static void SetLastException(const std::exception& e) { _pkmnLibLastException = std::string(e.what()); } + static const char* GetLastException() { return _pkmnLibLastException.c_str(); } }; #define Try(data) \