Rename C interface for getting last exception
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
e35f860b84
commit
cb942c4e89
|
@ -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(); }
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
#include <string>
|
||||
#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
|
||||
|
|
Loading…
Reference in New Issue