23 |
using namespace esysUtils; |
using namespace esysUtils; |
24 |
|
|
25 |
class DerivedEx : public EsysException { |
class DerivedEx : public EsysException { |
26 |
|
|
27 |
|
typedef EsysException Parent; |
28 |
|
|
29 |
public: |
public: |
30 |
|
|
31 |
/// Default Constructor for Exception |
/// Default Constructor for Exception |
32 |
DerivedEx() : EsysException() { updateMessage(); } |
DerivedEx() : Parent() { updateMessage(); } |
33 |
|
|
34 |
/// Constructor for Exception |
/// Constructor for Exception |
35 |
DerivedEx(const char *cstr) : EsysException(cstr) { updateMessage(); } |
DerivedEx(const char *cstr) : Parent(cstr) { updateMessage(); } |
36 |
|
|
37 |
/// Constructor for Exception |
/// Constructor for Exception |
38 |
DerivedEx(const string &str) : EsysException(str) { updateMessage(); } |
DerivedEx(const string &str) : Parent(str) { updateMessage(); } |
39 |
|
|
40 |
// Copy Constructor. |
// Copy Constructor. |
41 |
//DerivedEx(const EsysException &other): EsysException(other) {} |
DerivedEx(const DerivedEx &other): Parent(other) { updateMessage(); } |
42 |
|
|
43 |
/// Return the exception name |
/// Return the exception name |
44 |
virtual const string & exceptionName() const |
virtual const string & exceptionName() const |
171 |
// |
// |
172 |
DerivedEx copyEx(ex1); |
DerivedEx copyEx(ex1); |
173 |
string copyString = copyEx.toString(); |
string copyString = copyEx.toString(); |
|
std::cout << "\n==============================\n" |
|
|
<< ex1String << std::endl |
|
|
<< copyString << std::endl |
|
|
<< "==============================\n"; |
|
174 |
assert(ex1String == copyString); |
assert(ex1String == copyString); |
175 |
|
|
176 |
// |
// |