escript  Revision_
TransportProblemException.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_TransportProblemException_20040608_H
19 #define escript_TransportProblemException_20040608_H
20 
21 #include "system_dep.h"
22 #include "esysUtils/EsysException.h"
23 
24 namespace escript
25 {
26 
36 
37  protected:
38 
40 
41  public:
53  TransportProblemException(const char *cstr) :
54  Parent(cstr) { updateMessage();}
60  TransportProblemException(const std::string &str) :
61  Parent(str) { updateMessage();}
68  Parent(other)
69  {
70  updateMessage();
71  }
72 
76  {
77  Parent::operator=(other);
78  updateMessage();
79  return *this;
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 
103 #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: TransportProblemException.cpp:29
EsysException Parent
Definition: TransportProblemException.h:39
TransportProblemException & operator=(const TransportProblemException &other) THROW(NO_ARG)
Definition: TransportProblemException.h:75
A base class for exception classes used within Esys system.
Definition: EsysException.h:31
Definition: AbstractContinuousDomain.cpp:24
#define NO_ARG
Definition: esysUtils/src/system_dep.h:56
virtual ~TransportProblemException() THROW(NO_ARG)
Destructor.
Definition: TransportProblemException.h:84
static const std::string exceptionNameValue
Definition: TransportProblemException.h:98
TransportProblemException exception class.
Definition: TransportProblemException.h:35
TransportProblemException()
Default constructor for the exception.
Definition: TransportProblemException.h:47
#define THROW(ARG)
Definition: esysUtils/src/system_dep.h:53
EsysException()
Default Constructor. Creates an exception with no message.
Definition: EsysException.cpp:29
TransportProblemException(const std::string &str)
Constructor for the exception.
Definition: TransportProblemException.h:60
TransportProblemException(const char *cstr)
Constructor for the exception.
Definition: TransportProblemException.h:53
TransportProblemException(const TransportProblemException &other)
Copy Constructor for the exception.
Definition: TransportProblemException.h:67
#define ESCRIPT_DLL_API
Definition: escriptcore/src/system_dep.h:54