/[escript]/trunk/escript/src/DataException.h
ViewVC logotype

Contents of /trunk/escript/src/DataException.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1811 - (show annotations)
Thu Sep 25 23:11:13 2008 UTC (10 years, 5 months ago) by ksteube
File MIME type: text/plain
File size: 2223 byte(s)
Copyright updated in all files

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

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.26