escript  Revision_
FinleyAdapterException.h
Go to the documentation of this file.
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 
00018 #if !defined  finley_FinleyAdapterException_20040526_H
00019 #define finley_FinleyAdapterException_20040526_H
00020 #include "system_dep.h"
00021 
00022 #include "esysUtils/EsysException.h"
00023 
00024 namespace finley
00025 {
00026 
00035   class FinleyAdapterException : public esysUtils::EsysException
00036   {
00037 
00038   protected:
00039 
00040      typedef EsysException Parent;
00041 
00042   public:
00047     FINLEY_DLL_API
00048     FinleyAdapterException() : Parent() { updateMessage();}
00053     FINLEY_DLL_API
00054     FinleyAdapterException(const char *cstr) : Parent(cstr) { updateMessage();}
00059     FINLEY_DLL_API
00060     FinleyAdapterException(const std::string &str) :
00061     Parent(str) { updateMessage();}
00066     FINLEY_DLL_API
00067     FinleyAdapterException(const FinleyAdapterException &other) : Parent(other)
00068       {
00069         updateMessage();
00070       }
00071 
00073     FINLEY_DLL_API
00074     virtual ~FinleyAdapterException() THROW(NO_ARG) {}
00075 
00080     FINLEY_DLL_API
00081     inline FinleyAdapterException &
00082     operator=(const FinleyAdapterException &other ) THROW(NO_ARG)
00083        {
00084          Parent::operator=(other);
00085          updateMessage();
00086          return *this;
00087        }
00088 
00093     FINLEY_DLL_API
00094     virtual const std::string & exceptionName() const;
00095 
00096   private:
00097 
00098     //
00099     // the exception name is immutable and class-wide.
00100     // Inheritor note; you need one of these too.
00101     // and an overloaded exceptionName() in your .cpp implementation file. 
00102     static const std::string exceptionNameValue;
00103   };
00104 
00105 } // end of namespace
00106 #endif