Menu

#14 GCC: compilation problems: Exception

open
nobody
None
5
2006-06-18
2006-06-18
No

Under GCC (3.4.6), the code has numerous compilation
problems. Each category of problem will be covered in
a separate bug for tracking.

In Exception.h:

class Exception is derived from std::exception. The
problem is that std::exception's destructor is
explicitly declared as throw(). That means that the
destructor is promising the compiler it won't throw
any exceptions. All derived classes must also do this.

To fix: give Exception.h a destructor that looks like
this:

~Exception() throw() {}

Discussion


Log in to post a comment.

Auth0 Logo