1 |
jgs |
82 |
/* |
2 |
elspeth |
615 |
************************************************************ |
3 |
|
|
* Copyright 2006 by ACcESS MNRF * |
4 |
|
|
* * |
5 |
|
|
* http://www.access.edu.au * |
6 |
|
|
* Primary Business: Queensland, Australia * |
7 |
|
|
* Licensed under the Open Software License version 3.0 * |
8 |
|
|
* http://www.opensource.org/licenses/osl-3.0.php * |
9 |
|
|
* * |
10 |
|
|
************************************************************ |
11 |
jgs |
82 |
*/ |
12 |
jgs |
474 |
|
13 |
jgs |
82 |
#if !defined escript_DataException_20040324_H |
14 |
|
|
#define escript_DataException_20040324_H |
15 |
woo409 |
757 |
#include "system_dep.h" |
16 |
jgs |
82 |
|
17 |
robwdcock |
682 |
#include "esysUtils/EsysException.h" |
18 |
jgs |
474 |
|
19 |
jgs |
82 |
#include <string> |
20 |
|
|
|
21 |
|
|
namespace escript { |
22 |
|
|
|
23 |
|
|
/** |
24 |
|
|
\brief |
25 |
|
|
DataException exception class. |
26 |
|
|
|
27 |
|
|
Description: |
28 |
|
|
DataException exception class. |
29 |
|
|
The class provides a public function returning the exception name |
30 |
|
|
*/ |
31 |
|
|
class DataException:public esysUtils::EsysException { |
32 |
|
|
|
33 |
|
|
public: |
34 |
|
|
/** |
35 |
|
|
\brief |
36 |
|
|
Default constructor for the exception. |
37 |
|
|
*/ |
38 |
woo409 |
757 |
ESCRIPT_DLL_API |
39 |
jgs |
108 |
DataException() : esysUtils::EsysException() {} |
40 |
jgs |
82 |
/** |
41 |
|
|
\brief |
42 |
|
|
Constructor for the exception. |
43 |
|
|
*/ |
44 |
woo409 |
757 |
ESCRIPT_DLL_API |
45 |
jgs |
108 |
DataException(const char *cstr) : esysUtils::EsysException(cstr) {} |
46 |
jgs |
82 |
/** |
47 |
|
|
\brief |
48 |
|
|
Constructor for the exception. |
49 |
|
|
*/ |
50 |
woo409 |
757 |
ESCRIPT_DLL_API |
51 |
jgs |
108 |
DataException(const std::string &str) : esysUtils::EsysException(str) {} |
52 |
phornby |
1020 |
|
53 |
|
|
/// Destructor |
54 |
|
|
ESCRIPT_DLL_API |
55 |
phornby |
1022 |
virtual ~DataException() throw() {} |
56 |
phornby |
1020 |
|
57 |
jgs |
82 |
/** |
58 |
|
|
\brief |
59 |
|
|
Returns the name of the exception. |
60 |
|
|
*/ |
61 |
woo409 |
757 |
ESCRIPT_DLL_API |
62 |
jgs |
82 |
virtual std::string exceptionName() const {return "DataException";} |
63 |
|
|
}; |
64 |
|
|
|
65 |
|
|
} // end of namespace |
66 |
|
|
#endif |