ESYS13  Revision_
FunctionSpaceException.h
Go to the documentation of this file.
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  escript_FunctionSpaceException_20040602_H
00016 #define escript_FunctionSpaceException_20040602_H
00017 #include "system_dep.h"
00018 
00019 #include "esysUtils/EsysException.h"
00020 
00021 namespace escript
00022 {
00023 
00032   class FunctionSpaceException : public esysUtils::EsysException
00033   {
00034 
00035   protected:
00036 
00037      typedef EsysException Parent;
00038 
00039   public:
00044     ESCRIPT_DLL_API
00045     FunctionSpaceException() : Parent() { updateMessage();}
00050     ESCRIPT_DLL_API
00051     FunctionSpaceException(const char *cstr) : Parent(cstr) { updateMessage();}
00056     ESCRIPT_DLL_API
00057     FunctionSpaceException(const std::string &str) :
00058     Parent(str) { updateMessage();}
00063     ESCRIPT_DLL_API
00064     FunctionSpaceException(const FunctionSpaceException &other) : Parent(other)
00065       {
00066         updateMessage();
00067       }
00068 
00069     ESCRIPT_DLL_API
00070     inline FunctionSpaceException &
00071     operator=(const FunctionSpaceException &other ) THROW(NO_ARG)
00072        {
00073          Parent::operator=(other);
00074          updateMessage();
00075          return *this;
00076        }
00077 
00078 
00080     ESCRIPT_DLL_API
00081     virtual ~FunctionSpaceException() THROW(NO_ARG) {}
00086     ESCRIPT_DLL_API
00087     virtual const std::string & exceptionName() const;
00088 
00089   private:
00090 
00091     //
00092     // the exception name is immutable and class-wide.
00093     // Inheritor note; you need one of these too.
00094     // and an overloaded exceptionName() in your .cpp implementation file. 
00095     static const std::string exceptionNameValue;
00096   };
00097 
00098 } // end of namespace
00099 #endif