Inherit exceptions from std::exception.
authorScott Cantor <cantor.2@osu.edu>
Tue, 26 Dec 2006 02:16:11 +0000 (02:16 +0000)
committerScott Cantor <cantor.2@osu.edu>
Tue, 26 Dec 2006 02:16:11 +0000 (02:16 +0000)
xmltooling/exceptions.h

index a58c24f..14fbdab 100644 (file)
@@ -131,17 +131,12 @@ namespace xmltooling {
         namedparams(int count,...);
     };
 
-    class XMLTOOL_EXCEPTIONAPI(XMLTOOL_API) XMLToolingException;
-    
-    /** A factory function that returns an empty exception object of a given type. */
-    typedef XMLToolingException* ExceptionFactory();
-    
     /**
      * Base exception class, supports parametrized messages and XML serialization.
      * Parameters are prefixed with a dollar sign ($) and can be positional ($1)
      * or named ($info).
      */
-    class XMLTOOL_EXCEPTIONAPI(XMLTOOL_API) XMLToolingException
+    class XMLTOOL_EXCEPTIONAPI(XMLTOOL_API) XMLToolingException : public std::exception
     {
     public:
         virtual ~XMLToolingException() {}
@@ -311,6 +306,9 @@ namespace xmltooling {
          */
         static XMLToolingException* fromString(const char* s);
                 
+        /** A factory function that returns an empty exception object of a given type. */
+        typedef XMLToolingException* ExceptionFactory();
+        
         /**
          * Registers a factory to create exceptions of a given class name.
          *