40 |
// Copy Constructor. |
// Copy Constructor. |
41 |
DerivedEx(const DerivedEx &other): Parent(other) { updateMessage(); } |
DerivedEx(const DerivedEx &other): Parent(other) { updateMessage(); } |
42 |
|
|
43 |
|
virtual DerivedEx & |
44 |
|
operator=(const DerivedEx &other) THROW_ANY |
45 |
|
{ |
46 |
|
Parent::operator=(other); |
47 |
|
return *this; |
48 |
|
} |
49 |
|
|
50 |
/// Return the exception name |
/// Return the exception name |
51 |
virtual const string & exceptionName() const |
virtual const string & exceptionName() const |
52 |
{ |
{ |
264 |
throw ex4; |
throw ex4; |
265 |
} |
} |
266 |
catch (exception& e) { |
catch (exception& e) { |
267 |
cout << e.what() << endl; |
// cout << e.what() << endl; |
268 |
|
assert(e.what() == string("DerivedException: Exception caught" |
269 |
|
" as std::exception") |
270 |
|
); |
271 |
} |
} |
272 |
catch (...) { |
catch (...) { |
273 |
// |
// |