Mercurial > hg > orthanc
diff Core/OrthancException.h @ 1583:9ea3d082b064
got rid of custom exceptions
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 25 Aug 2015 17:52:50 +0200 |
parents | bd1889029cbb |
children | 87c77b9b3679 |
line wrap: on
line diff
--- a/Core/OrthancException.h Tue Aug 25 17:39:38 2015 +0200 +++ b/Core/OrthancException.h Tue Aug 25 17:52:50 2015 +0200 @@ -42,14 +42,6 @@ protected: ErrorCode errorCode_; HttpStatus httpStatus_; - std::string custom_; - - OrthancException(const std::string& custom) : - errorCode_(ErrorCode_Custom), - httpStatus_(HttpStatus_500_InternalServerError), - custom_(custom) - { - } public: OrthancException(ErrorCode errorCode) : @@ -77,14 +69,7 @@ const char* What() const { - if (errorCode_ == ErrorCode_Custom) - { - return custom_.c_str(); - } - else - { - return EnumerationToString(errorCode_); - } + return EnumerationToString(errorCode_); } }; }