Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
@@ -16,17 +16,16 @@ class ExceptionHandler {
|
||||
static std::string _creatureLibLastExceptionStacktrace;
|
||||
|
||||
public:
|
||||
static void SetLastArbUtException(const std::string& function, const ArbUt::Exception& e) {
|
||||
static void SetLastArbUtException(const std::string& function, const ArbUt::Exception& e, size_t depth = 6) {
|
||||
std::stringstream ss;
|
||||
ss << "[" << function << "] " << e.what() << std::endl;
|
||||
ss << "[" << function << "] " << e.what();
|
||||
_creatureLibLastException = ss.str();
|
||||
_creatureLibLastExceptionStacktrace = e.GetStacktrace();
|
||||
_creatureLibLastExceptionStacktrace = e.GetStacktrace(depth, true);
|
||||
}
|
||||
static void SetLastException(const std::string& function, const std::exception& e) {
|
||||
std::stringstream ss;
|
||||
ss << "[" << function << "] " << e.what();
|
||||
_creatureLibLastException = ss.str();
|
||||
_creatureLibLastExceptionStacktrace = "";
|
||||
}
|
||||
static const char* GetLastException() { return _creatureLibLastException.c_str(); }
|
||||
static const char* GetLastExceptionStacktrace() { return _creatureLibLastExceptionStacktrace.c_str(); }
|
||||
|
||||
Reference in New Issue
Block a user