/[escript]/trunk/ripley/src/RipleyException.h
ViewVC logotype

Contents of /trunk/ripley/src/RipleyException.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3792 - (show annotations)
Wed Feb 1 06:16:25 2012 UTC (6 years, 11 months ago) by caltinay
File MIME type: text/plain
File size: 2037 byte(s)
Merged ripley rectangular domain into trunk.

1
2 /*******************************************************
3 *
4 * Copyright (c) 2003-2012 by University of Queensland
5 * Earth Systems Science Computational Center (ESSCC)
6 * http://www.uq.edu.au/esscc
7 *
8 * Primary Business: Queensland, Australia
9 * Licensed under the Open Software License version 3.0
10 * http://www.opensource.org/licenses/osl-3.0.php
11 *
12 *******************************************************/
13
14 #ifndef __RIPLEY_EXCEPTION_H__
15 #define __RIPLEY_EXCEPTION_H__
16
17 #include <ripley/system_dep.h>
18 #include <esysUtils/EsysException.h>
19
20 namespace ripley {
21
22 /**
23 \brief
24 RipleyException exception class.
25 */
26 class RipleyException : public esysUtils::EsysException
27 {
28 protected:
29 typedef EsysException Parent;
30
31 public:
32 /**
33 \brief
34 Default constructor for the exception.
35 */
36 RIPLEY_DLL_API
37 RipleyException() : Parent() { updateMessage(); }
38
39 /**
40 \brief
41 Constructor with message.
42 */
43 RIPLEY_DLL_API
44 RipleyException(const char *cstr) : Parent(cstr) { updateMessage(); }
45
46 /**
47 \brief
48 Constructor with message.
49 */
50 RIPLEY_DLL_API
51 RipleyException(const std::string &str) : Parent(str) { updateMessage(); }
52
53 /**
54 \brief
55 Copy Constructor.
56 */
57 RIPLEY_DLL_API
58 RipleyException(const RipleyException &other) : Parent(other)
59 {
60 updateMessage();
61 }
62
63 /// Destructor
64 RIPLEY_DLL_API
65 virtual ~RipleyException() THROW(NO_ARG) {}
66
67 /**
68 \brief
69 Assignment operator.
70 */
71 RIPLEY_DLL_API
72 inline RipleyException& operator=(const RipleyException &other ) THROW(NO_ARG)
73 {
74 Parent::operator=(other);
75 updateMessage();
76 return *this;
77 }
78
79 /**
80 \brief
81 Returns the name of the exception.
82 */
83 RIPLEY_DLL_API
84 virtual const std::string& exceptionName() const;
85
86 private:
87 //
88 // the exception name is immutable and class-wide.
89 static const std::string exceptionNameValue;
90 };
91
92 } // end of namespace ripley
93
94 #endif // __RIPLEY_EXCEPTION_H__
95

  ViewVC Help
Powered by ViewVC 1.1.26