ESYS13
Revision_
|
00001 00002 /******************************************************* 00003 * 00004 * Copyright (c) 2003-2012 by University of Queensland 00005 * Earth Systems Science Computational Center (ESSCC) 00006 * http://www.uq.edu.au/esscc 00007 * 00008 * Primary Business: Queensland, Australia 00009 * Licensed under the Open Software License version 3.0 00010 * http://www.opensource.org/licenses/osl-3.0.php 00011 * 00012 *******************************************************/ 00013 00014 00015 #if !defined dudley_DudleyAdapterException_20040526_H 00016 #define dudley_DudleyAdapterException_20040526_H 00017 #include "system_dep.h" 00018 00019 #include "esysUtils/EsysException.h" 00020 00021 namespace dudley 00022 { 00023 00032 class DudleyAdapterException : public esysUtils::EsysException 00033 { 00034 00035 protected: 00036 00037 typedef EsysException Parent; 00038 00039 public: 00044 DUDLEY_DLL_API 00045 DudleyAdapterException() : Parent() { updateMessage();} 00050 DUDLEY_DLL_API 00051 DudleyAdapterException(const char *cstr) : Parent(cstr) { updateMessage();} 00056 DUDLEY_DLL_API 00057 DudleyAdapterException(const std::string &str) : 00058 Parent(str) { updateMessage();} 00063 DUDLEY_DLL_API 00064 DudleyAdapterException(const DudleyAdapterException &other) : Parent(other) 00065 { 00066 updateMessage(); 00067 } 00068 00070 DUDLEY_DLL_API 00071 virtual ~DudleyAdapterException() THROW(NO_ARG) {} 00072 00077 DUDLEY_DLL_API 00078 inline DudleyAdapterException & 00079 operator=(const DudleyAdapterException &other ) THROW(NO_ARG) 00080 { 00081 Parent::operator=(other); 00082 updateMessage(); 00083 return *this; 00084 } 00085 00090 DUDLEY_DLL_API 00091 virtual const std::string & exceptionName() const; 00092 00093 private: 00094 00095 // 00096 // the exception name is immutable and class-wide. 00097 // Inheritor note; you need one of these too. 00098 // and an overloaded exceptionName() in your .cpp implementation file. 00099 static const std::string exceptionNameValue; 00100 }; 00101 00102 } // end of namespace 00103 #endif