escript  Revision_Unversioneddirectory
FunctionSpaceException.h
Go to the documentation of this file.
1 
2 /*****************************************************************************
3 *
4 * Copyright (c) 2003-2016 by The University of Queensland
5 * http://www.uq.edu.au
6 *
7 * Primary Business: Queensland, Australia
8 * Licensed under the Apache License, version 2.0
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 * Development 2012-2013 by School of Earth Sciences
13 * Development from 2014 by Centre for Geoscience Computing (GeoComp)
14 *
15 *****************************************************************************/
16 
17 
18 #if !defined escript_FunctionSpaceException_20040602_H
19 #define escript_FunctionSpaceException_20040602_H
20 #include "system_dep.h"
21 
22 #include "esysUtils/EsysException.h"
23 
24 namespace escript
25 {
26 
36  {
37 
38  protected:
39 
41 
42  public:
54  FunctionSpaceException(const char *cstr) : Parent(cstr) { updateMessage();}
60  FunctionSpaceException(const std::string &str) :
61  Parent(str) { updateMessage();}
67  FunctionSpaceException(const FunctionSpaceException &other) : Parent(other)
68  {
69  updateMessage();
70  }
71 
73  inline FunctionSpaceException &
75  {
76  Parent::operator=(other);
77  updateMessage();
78  return *this;
79  }
80 
81 
90  virtual const std::string & exceptionName() const;
91 
92  private:
93 
94  //
95  // the exception name is immutable and class-wide.
96  // Inheritor note; you need one of these too.
97  // and an overloaded exceptionName() in your .cpp implementation file.
98  static const std::string exceptionNameValue;
99  };
100 
101 } // end of namespace
102 #endif
void updateMessage()
update m_exceptionMessage after a reason update.
Definition: EsysException.h:202
virtual const std::string & exceptionName() const
Returns the name of the exception.
Definition: FunctionSpaceException.cpp:29
A base class for exception classes used within Esys system.
Definition: EsysException.h:31
static const std::string exceptionNameValue
Definition: FunctionSpaceException.h:98
Definition: AbstractContinuousDomain.cpp:24
#define NO_ARG
Definition: esysUtils/src/system_dep.h:56
FunctionSpaceException(const char *cstr)
Constructor for the exception.
Definition: FunctionSpaceException.h:54
FunctionSpaceException(const FunctionSpaceException &other)
Copy Constructor for the exception.
Definition: FunctionSpaceException.h:67
FunctionSpaceException & operator=(const FunctionSpaceException &other) THROW(NO_ARG)
Definition: FunctionSpaceException.h:74
virtual ~FunctionSpaceException() THROW(NO_ARG)
Destructor.
Definition: FunctionSpaceException.h:84
EsysException Parent
Definition: FunctionSpaceException.h:40
#define THROW(ARG)
Definition: esysUtils/src/system_dep.h:53
EsysException()
Default Constructor. Creates an exception with no message.
Definition: EsysException.cpp:29
FunctionSpaceException exception class.
Definition: FunctionSpaceException.h:35
#define ESCRIPT_DLL_API
Definition: escriptcore/src/system_dep.h:54
FunctionSpaceException(const std::string &str)
Constructor for the exception.
Definition: FunctionSpaceException.h:60
FunctionSpaceException()
Default constructor for the exception.
Definition: FunctionSpaceException.h:48