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

Contents of /branches/subworld2/escriptcore/src/SplitWorldException.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: 2560 byte(s)
Again with a more up to date copy


1
2 /*****************************************************************************
3 *
4 * Copyright (c) 2014-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 // Adapted from FunctionSpaceException.h
18
19 #ifndef __ESCRIPT_SPLITWORLDEXCEPTION_H__
20 #define __ESCRIPT_SPLITWORLDEXCEPTION_H__
21
22 #include "system_dep.h"
23 #include "esysUtils/EsysException.h"
24
25 namespace escript
26 {
27
28 /**
29 \brief
30 SplitWorldException exception class.
31
32 Description:
33 SplitWorldException exception class.
34 The class provides a public function returning the exception name
35 */
36 class SplitWorldException : public esysUtils::EsysException
37 {
38
39 protected:
40
41 typedef EsysException Parent;
42
43 public:
44 /**
45 \brief
46 Default constructor for the exception.
47 */
48 ESCRIPT_DLL_API
49 SplitWorldException() : Parent() { updateMessage();}
50 /**
51 \brief
52 Constructor for the exception.
53 */
54 ESCRIPT_DLL_API
55 SplitWorldException(const char *cstr) : Parent(cstr) { updateMessage();}
56 /**
57 \brief
58 Constructor for the exception.
59 */
60 ESCRIPT_DLL_API
61 SplitWorldException(const std::string &str) :
62 Parent(str) { updateMessage();}
63 /**
64 \brief
65 Copy Constructor for the exception.
66 */
67 ESCRIPT_DLL_API
68 SplitWorldException(const SplitWorldException &other) : Parent(other)
69 {
70 updateMessage();
71 }
72
73 ESCRIPT_DLL_API
74 inline SplitWorldException &
75 operator=(const SplitWorldException &other ) THROW(NO_ARG)
76 {
77 Parent::operator=(other);
78 updateMessage();
79 return *this;
80 }
81
82
83 /// Destructor
84 ESCRIPT_DLL_API
85 virtual ~SplitWorldException() THROW(NO_ARG) {}
86 /**
87 \brief
88 Returns the name of the exception.
89 */
90 ESCRIPT_DLL_API
91 virtual const std::string& exceptionName() const;
92
93 private:
94
95 //
96 // the exception name is immutable and class-wide.
97 // Inheritor note; you need one of these too.
98 // and an overloaded exceptionName() in your .cpp implementation file.
99 static const std::string exceptionNameValue;
100 };
101
102 } // end of namespace
103
104 #endif // __ESCRIPT_SPLITWORLDEXCEPTION_H__
105

  ViewVC Help
Powered by ViewVC 1.1.26