Mercurial > hg > orthanc-stone
diff Framework/StoneException.h @ 1049:348866dd217c
removing classes OpenGLContextLostException and StoneOrthancException
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 10 Oct 2019 14:29:02 +0200 |
parents | efc5b62b9539 |
children | 5df50e0f0390 |
line wrap: on
line diff
--- a/Framework/StoneException.h Thu Oct 10 14:11:52 2019 +0200 +++ b/Framework/StoneException.h Thu Oct 10 14:29:02 2019 +0200 @@ -46,7 +46,6 @@ }; - class StoneException { protected: @@ -70,73 +69,6 @@ return "TODO: EnumerationToString for StoneException"; } }; - - class OpenGLContextLostException : public StoneException - { - public: - explicit OpenGLContextLostException(void* context) - : StoneException(ErrorCode_WebGLContextLost) - , context_(context) - { - } - virtual const char* What() const - { - return "The OpenGL/WebGL context has been lost!"; - } - void* context_; - }; - - // TODO - Is this still necessary? - class StoneOrthancException : public StoneException - { - protected: - Orthanc::OrthancException& orthancException_; - - public: - explicit StoneOrthancException(Orthanc::OrthancException& orthancException) : - StoneException(ErrorCode_OrthancError), - orthancException_(orthancException) - { - } - - Orthanc::ErrorCode GetOrthancErrorCode() const - { - return orthancException_.GetErrorCode(); - } - - virtual const char* What() const - { - return orthancException_.What(); - } - }; - - // TODO - To be moved in "../Applications/" - class StoneApplicationException : public StoneException - { - protected: - int applicationErrorCode_; - mutable std::string errorMessage_; - - public: - explicit StoneApplicationException(int applicationErrorCode) : - StoneException(ErrorCode_ApplicationException), - applicationErrorCode_(applicationErrorCode) - { - } - - int GetApplicationErrorCode() const - { - return applicationErrorCode_; - } - - virtual const char* What() const - { - if (errorMessage_.size() == 0) - errorMessage_ = boost::lexical_cast<std::string>(applicationErrorCode_); - - return errorMessage_.c_str(); - } - }; } // See https://isocpp.org/wiki/faq/misc-technical-issues#macros-with-multi-stmts @@ -165,14 +97,6 @@ - - - - - - - - /* Explanation: