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

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

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26