- added support for throwing known errors and skipping stack traces (For friendlier error messages)

This commit is contained in:
Mark Vejvoda
2012-07-20 23:51:10 +00:00
parent ed9ae076c5
commit 0b9ad4c457
5 changed files with 57 additions and 8 deletions

View File

@@ -256,8 +256,8 @@ string PlatformExceptionHandler::getStackTrace() {
return errMsg;
}
megaglest_runtime_error::megaglest_runtime_error(const string& __arg)
: std::runtime_error(__arg + PlatformExceptionHandler::getStackTrace()) {
megaglest_runtime_error::megaglest_runtime_error(const string& __arg,bool noStackTrace)
: std::runtime_error(noStackTrace ? __arg + PlatformExceptionHandler::getStackTrace() : __arg), noStackTrace(noStackTrace) {
}
}}//end namespace

View File

@@ -265,8 +265,8 @@ string PlatformExceptionHandler::getStackTrace() {
return result;
}
megaglest_runtime_error::megaglest_runtime_error(const string& __arg)
: std::runtime_error(__arg + PlatformExceptionHandler::getStackTrace()) {
megaglest_runtime_error::megaglest_runtime_error(const string& __arg,bool noStackTrace)
: std::runtime_error(noStackTrace ? __arg + PlatformExceptionHandler::getStackTrace() : __arg), noStackTrace(noStackTrace) {
}
// =====================================================