escript  Revision_
RipleyException.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 #ifndef __RIPLEY_EXCEPTION_H__
18 #define __RIPLEY_EXCEPTION_H__
19 
20 #include <ripley/system_dep.h>
21 #include <esysUtils/EsysException.h>
22 
23 namespace ripley {
24 
30 {
31 protected:
32  typedef EsysException Parent;
33 
34 public:
39  RipleyException() : Parent() { updateMessage(); }
40 
45  RipleyException(const char *cstr) : Parent(cstr) { updateMessage(); }
46 
51  RipleyException(const std::string &str) : Parent(str) { updateMessage(); }
52 
57  RipleyException(const RipleyException &other) : Parent(other)
58  {
59  updateMessage();
60  }
61 
64 
70  {
71  Parent::operator=(other);
72  updateMessage();
73  return *this;
74  }
75 
80  virtual const std::string& exceptionName() const;
81 
82 private:
83  //
84  // the exception name is immutable and class-wide.
85  static const std::string exceptionNameValue;
86 };
87 
88 } // end of namespace ripley
89 
90 #endif // __RIPLEY_EXCEPTION_H__
91 
EsysException Parent
Definition: RipleyException.h:32
virtual ~RipleyException() THROW(NO_ARG)
Destructor.
Definition: RipleyException.h:63
RipleyException & operator=(const RipleyException &other) THROW(NO_ARG)
Assignment operator.
Definition: RipleyException.h:69
RipleyException(const RipleyException &other)
Copy Constructor.
Definition: RipleyException.h:57
A base class for exception classes used within Esys system.
Definition: EsysException.h:31
#define NO_ARG
Definition: esysUtils/src/system_dep.h:56
RipleyException(const std::string &str)
Constructor with message.
Definition: RipleyException.h:51
RipleyException exception class.
Definition: RipleyException.h:29
#define THROW(ARG)
Definition: esysUtils/src/system_dep.h:53
Definition: ripley/src/AbstractAssembler.h:25
RipleyException(const char *cstr)
Constructor with message.
Definition: RipleyException.h:45
static const std::string exceptionNameValue
Definition: RipleyException.h:85
#define RIPLEY_DLL_API
Definition: ripley/src/system_dep.h:22
RipleyException()
Default constructor for the exception.
Definition: RipleyException.h:39