escript
Revision_
|
00001 00002 /***************************************************************************** 00003 * 00004 * Copyright (c) 2003-2014 by University of Queensland 00005 * http://www.uq.edu.au 00006 * 00007 * Primary Business: Queensland, Australia 00008 * Licensed under the Open Software License version 3.0 00009 * http://www.opensource.org/licenses/osl-3.0.php 00010 * 00011 * Development until 2012 by Earth Systems Science Computational Center (ESSCC) 00012 * Development 2012-2013 by School of Earth Sciences 00013 * Development from 2014 by Centre for Geoscience Computing (GeoComp) 00014 * 00015 *****************************************************************************/ 00016 00017 #ifndef __RIPLEY_EXCEPTION_H__ 00018 #define __RIPLEY_EXCEPTION_H__ 00019 00020 #include <ripley/system_dep.h> 00021 #include <esysUtils/EsysException.h> 00022 00023 namespace ripley { 00024 00029 class RIPLEY_DLL_API RipleyException : public esysUtils::EsysException 00030 { 00031 protected: 00032 typedef EsysException Parent; 00033 00034 public: 00039 RipleyException() : Parent() { updateMessage(); } 00040 00045 RipleyException(const char *cstr) : Parent(cstr) { updateMessage(); } 00046 00051 RipleyException(const std::string &str) : Parent(str) { updateMessage(); } 00052 00057 RipleyException(const RipleyException &other) : Parent(other) 00058 { 00059 updateMessage(); 00060 } 00061 00063 virtual ~RipleyException() THROW(NO_ARG) {} 00064 00069 inline RipleyException& operator=(const RipleyException &other ) THROW(NO_ARG) 00070 { 00071 Parent::operator=(other); 00072 updateMessage(); 00073 return *this; 00074 } 00075 00080 virtual const std::string& exceptionName() const; 00081 00082 private: 00083 // 00084 // the exception name is immutable and class-wide. 00085 static const std::string exceptionNameValue; 00086 }; 00087 00088 } // end of namespace ripley 00089 00090 #endif // __RIPLEY_EXCEPTION_H__ 00091