escript  Revision_
SolverOptionsException.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 __SOLVEROPTIONS_EXCEPTION_H__
18 #define __SOLVEROPTIONS_EXCEPTION_H__
19 
20 #include "system_dep.h"
21 #include <esysUtils/EsysException.h>
22 
23 namespace escript {
24 
30 {
31 protected:
32  typedef EsysException Parent;
33 
34 public:
39  SolverOptionsException() : Parent() { updateMessage(); }
40 
45  SolverOptionsException(const char *cstr) : Parent(cstr) { updateMessage(); }
46 
51  SolverOptionsException(const std::string &str) : Parent(str) { updateMessage(); }
52 
57  SolverOptionsException(const SolverOptionsException &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 }
89 
90 #endif
91 
SolverOptionsException(const std::string &str)
Constructor with message.
Definition: SolverOptionsException.h:51
SolverOptionsException(const char *cstr)
Constructor with message.
Definition: SolverOptionsException.h:45
A base class for exception classes used within Esys system.
Definition: EsysException.h:31
Definition: AbstractContinuousDomain.cpp:24
EsysException Parent
Definition: SolverOptionsException.h:32
#define NO_ARG
Definition: esysUtils/src/system_dep.h:56
static const std::string exceptionNameValue
Definition: SolverOptionsException.h:85
SolverOptionsException exception class.
Definition: SolverOptionsException.h:29
virtual ~SolverOptionsException() THROW(NO_ARG)
Destructor.
Definition: SolverOptionsException.h:63
SolverOptionsException()
Default constructor for the exception.
Definition: SolverOptionsException.h:39
SolverOptionsException(const SolverOptionsException &other)
Copy Constructor.
Definition: SolverOptionsException.h:57
#define THROW(ARG)
Definition: esysUtils/src/system_dep.h:53
#define ESCRIPT_DLL_API
Definition: escriptcore/src/system_dep.h:54
SolverOptionsException & operator=(const SolverOptionsException &other) THROW(NO_ARG)
Assignment operator.
Definition: SolverOptionsException.h:69