Changes PkmnLibException.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
90c33bfef0
commit
770d3be466
|
@ -1,4 +1,4 @@
|
|||
#include "Core.hpp"
|
||||
|
||||
std::string ExceptionHandler::_lastException = "";
|
||||
std::string ExceptionHandler::_pkmnLibLastException = "";
|
||||
export const char* PkmnLib_C_GetLastException() { return ExceptionHandler::GetLastException(); }
|
|
@ -6,15 +6,14 @@
|
|||
#include <string>
|
||||
#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) \
|
||||
|
|
Loading…
Reference in New Issue