More reworks of exceptions.
This commit is contained in:
@@ -14,9 +14,9 @@ class ExceptionHandler {
|
||||
static std::string _lastException;
|
||||
|
||||
public:
|
||||
static void SetLastException(std::string file, std::string function, int line, const std::exception& e) {
|
||||
static void SetLastException(std::string function, const std::exception& e) {
|
||||
std::stringstream ss;
|
||||
ss << "[" << file << ", " << function << "-" << line << "] " << e.what();
|
||||
ss << "[" << function << "] " << e.what();
|
||||
_lastException = ss.str();
|
||||
}
|
||||
static const char* GetLastException() { return _lastException.c_str(); }
|
||||
@@ -27,7 +27,7 @@ public:
|
||||
data; \
|
||||
return 0; \
|
||||
} catch (const std::exception& e) { \
|
||||
ExceptionHandler::SetLastException(__FILENAME__, __FUNCTION__, __LINE__, e); \
|
||||
ExceptionHandler::SetLastException(__FUNCTION__, e); \
|
||||
return CreatureLibException; \
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user