ESScript
Revision_
Main Page
Namespaces
Classes
Files
File List
File Members
esysUtils
src
EsysAssertException.h
Go to the documentation of this file.
1
2
/*****************************************************************************
3
*
4
* Copyright (c) 2003-2013 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 since 2012 by School of Earth Sciences
13
*
14
*****************************************************************************/
15
16
17
#if !defined escript_EsysAssertException_20040330_H
18
#define escript_EsysAssertException_20040330_H
19
#include "
system_dep.h
"
20
21
#include "
EsysException.h
"
22
23
24
namespace
esysUtils {
25
34
class
EsysAssertException
:
public
EsysException
35
{
36
37
protected
:
38
39
typedef
EsysException
Parent
;
40
41
public
:
46
ESYSUTILS_DLL_API
47
inline
48
EsysAssertException
() :
Parent
() {
updateMessage
();}
53
ESYSUTILS_DLL_API
54
inline
55
EsysAssertException
(
const
char
*cstr) :
Parent
(cstr) {
updateMessage
();}
60
ESYSUTILS_DLL_API
61
inline
62
EsysAssertException
(
const
std::string &str) :
63
Parent
(str) {
updateMessage
();}
68
ESYSUTILS_DLL_API
69
inline
70
EsysAssertException
(
const
EsysAssertException
&other) :
Parent
(other)
71
{
72
updateMessage
();
73
}
74
75
ESYSUTILS_DLL_API
76
inline
77
EsysAssertException
&
78
operator=
(
const
EsysAssertException
&other)
THROW
(
NO_ARG
)
79
{
80
Parent::operator=
(other);
81
updateMessage
();
82
return
*
this
;
83
}
84
85
87
ESYSUTILS_DLL_API
88
virtual
~EsysAssertException
()
THROW
(
NO_ARG
) {}
89
94
ESYSUTILS_DLL_API
95
virtual
const
std::string &
exceptionName
()
const
;
96
101
ESYSUTILS_DLL_API
102
static
void
assertFailure
(
const
std::string& assertion,
103
const
std::string& date,
104
const
std::string& file,
105
int
line,
const
std::string& errDesc);
106
private
:
107
108
//
109
// the exception name is immutable and class-wide.
110
// Inheritor note; you need one of these too.
111
// and an overloaded exceptionName() in your .cpp implementation file.
112
static
const
std::string
exceptionNameValue
;
113
};
114
115
}
// end of namespace
116
117
#endif
Generated on Thu Dec 12 2013 03:47:17 for ESScript by
1.8.1.2