/[escript]/branches/subworld2/escriptcore/src/SolverOptionsException.h
ViewVC logotype

Contents of /branches/subworld2/escriptcore/src/SolverOptionsException.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5504 - (show annotations)
Wed Mar 4 22:58:13 2015 UTC (4 years, 1 month ago) by jfenwick
File MIME type: text/plain
File size: 2132 byte(s)
Again with a more up to date copy


1
2 /*****************************************************************************
3 *
4 * Copyright (c) 2003-2015 by University of Queensland
5 * http://www.uq.edu.au
6 *
7 * Primary Business: Queensland, Australia
8 * Licensed under the Open Software License version 3.0
9 * http://www.opensource.org/licenses/osl-3.0.php
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
25 /**
26 \brief
27 SolverOptionsException exception class.
28 */
29 class ESCRIPT_DLL_API SolverOptionsException : public esysUtils::EsysException
30 {
31 protected:
32 typedef EsysException Parent;
33
34 public:
35 /**
36 \brief
37 Default constructor for the exception.
38 */
39 SolverOptionsException() : Parent() { updateMessage(); }
40
41 /**
42 \brief
43 Constructor with message.
44 */
45 SolverOptionsException(const char *cstr) : Parent(cstr) { updateMessage(); }
46
47 /**
48 \brief
49 Constructor with message.
50 */
51 SolverOptionsException(const std::string &str) : Parent(str) { updateMessage(); }
52
53 /**
54 \brief
55 Copy Constructor.
56 */
57 SolverOptionsException(const SolverOptionsException &other) : Parent(other)
58 {
59 updateMessage();
60 }
61
62 /// Destructor
63 virtual ~SolverOptionsException() THROW(NO_ARG) {}
64
65 /**
66 \brief
67 Assignment operator.
68 */
69 inline SolverOptionsException& operator=(const SolverOptionsException &other ) THROW(NO_ARG)
70 {
71 Parent::operator=(other);
72 updateMessage();
73 return *this;
74 }
75
76 /**
77 \brief
78 Returns the name of the exception.
79 */
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

  ViewVC Help
Powered by ViewVC 1.1.26