]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Add destructor to Exception classes with empty throw list, since otherwise the throw...
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 22 Jan 2001 07:53:28 +0000 (07:53 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 22 Jan 2001 07:53:28 +0000 (07:53 +0000)
git-svn-id: https://svn.dealii.org/branches/Branch-3-1@3737 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/include/base/exceptions.h
deal.II/base/source/exceptions.cc

index 9cc0e087395aa8b516f56c002f051803981ce9fb..1632040b9e0a3f8a55f5eb526a63370c144b1090 100644 (file)
@@ -295,6 +295,19 @@ class ExceptionBase : public std::exception
     ExceptionBase (const char* f, const int l, const char *func,
                   const char* c, const char *e);
 
+                                    /**
+                                     * Destructor. Empty, but needed
+                                     * for the sake of exception
+                                     * specification, since the base
+                                     * class has this exception
+                                     * specification and the
+                                     * automatically generated
+                                     * destructor would have a
+                                     * different one due to member
+                                     * objects.
+                                     */
+    virtual ~ExceptionBase () throw();
+    
                                     /**
                                      *  Set the file name and line of where the
                                      *  exception appeared as well as the violated
@@ -505,6 +518,7 @@ class Exception0 :  public ExceptionBase {}
 class Exception1 : public ExceptionBase {                             \
   public:                                                             \
       Exception1 (const type1 a1) : arg1 (a1) {};                     \
+      virtual ~Exception1 () throw () {};                             \
       virtual void PrintInfo (std::ostream &out) const {              \
         out outsequence << std::endl;                                 \
       };                                                              \
@@ -525,6 +539,7 @@ class Exception2 : public ExceptionBase {                             \
   public:                                                             \
       Exception2 (const type1 a1, const type2 a2) :                   \
              arg1 (a1), arg2(a2) {};                                 \
+      virtual ~Exception2 () throw () {};                             \
       virtual void PrintInfo (std::ostream &out) const {              \
         out outsequence << std::endl;                                 \
       };                                                              \
@@ -546,6 +561,7 @@ class Exception3 : public ExceptionBase {                             \
   public:                                                             \
       Exception3 (const type1 a1, const type2 a2, const type3 a3) :   \
              arg1 (a1), arg2(a2), arg3(a3) {};                       \
+      virtual ~Exception3 () throw () {};                             \
       virtual void PrintInfo (std::ostream &out) const {              \
         out outsequence << std::endl;                                 \
       };                                                              \
@@ -569,6 +585,7 @@ class Exception4 : public ExceptionBase {                             \
       Exception4 (const type1 a1, const type2 a2,                     \
            const type3 a3, const type4 a4) :                         \
              arg1 (a1), arg2(a2), arg3(a3), arg4(a4) {};             \
+      virtual ~Exception4 () throw () {};                             \
       virtual void PrintInfo (std::ostream &out) const {              \
         out outsequence << std::endl;                                 \
       };                                                              \
@@ -593,6 +610,7 @@ class Exception5 : public ExceptionBase {                             \
       Exception5 (const type1 a1, const type2 a2, const type3 a3,     \
            const type4 a4, const type5 a5) :                         \
              arg1 (a1), arg2(a2), arg3(a3), arg4(a4), arg5(a5) {};   \
+      virtual ~Exception5 () throw () {};                             \
       virtual void PrintInfo (std::ostream &out) const {              \
         out outsequence << std::endl;                                 \
       };                                                              \
index 028c2312447567dd9f2deed63123b598c3766dba..ecc12b110c22ae4bd8d6d420281db72eb919a418 100644 (file)
@@ -22,12 +22,19 @@ ExceptionBase::ExceptionBase () :
 {};
 
 
+
 ExceptionBase::ExceptionBase (const char* f, const int l, const char *func,
                              const char* c, const char *e) :
                file(f), line(l), function(func), cond(c), exc(e)
 {};
 
 
+
+ExceptionBase::~ExceptionBase () throw ()
+{};
+
+
+
 void ExceptionBase::SetFields (const char* f,
                               const int l,
                               const char *func,

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.