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 __SOLVEROPTIONS_EXCEPTION_H__ 00018 #define __SOLVEROPTIONS_EXCEPTION_H__ 00019 00020 #include "system_dep.h" 00021 #include <esysUtils/EsysException.h> 00022 00023 namespace escript { 00024 00029 class ESCRIPT_DLL_API SolverOptionsException : public esysUtils::EsysException 00030 { 00031 protected: 00032 typedef EsysException Parent; 00033 00034 public: 00039 SolverOptionsException() : Parent() { updateMessage(); } 00040 00045 SolverOptionsException(const char *cstr) : Parent(cstr) { updateMessage(); } 00046 00051 SolverOptionsException(const std::string &str) : Parent(str) { updateMessage(); } 00052 00057 SolverOptionsException(const SolverOptionsException &other) : Parent(other) 00058 { 00059 updateMessage(); 00060 } 00061 00063 virtual ~SolverOptionsException() THROW(NO_ARG) {} 00064 00069 inline SolverOptionsException& operator=(const SolverOptionsException &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 } 00089 00090 #endif 00091