activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r688327 [1/2] - in /activemq/activemq-cpp/trunk/src: main/activemq/connector/ main/activemq/connector/openwire/ main/activemq/connector/stomp/ main/activemq/connector/stomp/marshal/ main/activemq/exceptions/ main/activemq/transport/ main/cm...
Date Sat, 23 Aug 2008 14:08:01 GMT
Author: tabish
Date: Sat Aug 23 07:07:59 2008
New Revision: 688327

URL: http://svn.apache.org/viewvc?rev=688327&view=rev
Log:
http://issues.apache.org/activemq/browse/AMQCPP-192

added getCause and constructors to take a std::exception as the cause.  

Modified:
    activemq/activemq-cpp/trunk/src/main/activemq/connector/ConnectorException.h
    activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireConnectorException.h
    activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompConnectorException.h
    activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/marshal/MarshalException.h
    activemq/activemq-cpp/trunk/src/main/activemq/exceptions/ActiveMQException.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/exceptions/ActiveMQException.h
    activemq/activemq-cpp/trunk/src/main/activemq/transport/CommandIOException.h
    activemq/activemq-cpp/trunk/src/main/cms/CMSException.h
    activemq/activemq-cpp/trunk/src/main/decaf/io/EOFException.h
    activemq/activemq-cpp/trunk/src/main/decaf/io/IOException.h
    activemq/activemq-cpp/trunk/src/main/decaf/io/InterruptedIOException.h
    activemq/activemq-cpp/trunk/src/main/decaf/lang/Exception.cpp
    activemq/activemq-cpp/trunk/src/main/decaf/lang/Exception.h
    activemq/activemq-cpp/trunk/src/main/decaf/lang/Throwable.h
    activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/ExceptionDefines.h
    activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/IllegalArgumentException.h
    activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/IllegalMonitorStateException.h
    activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/IllegalStateException.h
    activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/IndexOutOfBoundsException.h
    activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/InterruptedException.h
    activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/InvalidStateException.h
    activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/NoSuchElementException.h
    activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/NullPointerException.h
    activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/NumberFormatException.h
    activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/RuntimeException.h
    activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/UnsupportedOperationException.h
    activemq/activemq-cpp/trunk/src/main/decaf/net/BindException.h
    activemq/activemq-cpp/trunk/src/main/decaf/net/ConnectException.h
    activemq/activemq-cpp/trunk/src/main/decaf/net/HttpRetryException.h
    activemq/activemq-cpp/trunk/src/main/decaf/net/MalformedURLException.h
    activemq/activemq-cpp/trunk/src/main/decaf/net/NoRouteToHostException.h
    activemq/activemq-cpp/trunk/src/main/decaf/net/PortUnreachableException.h
    activemq/activemq-cpp/trunk/src/main/decaf/net/ProtocolException.h
    activemq/activemq-cpp/trunk/src/main/decaf/net/SocketException.h
    activemq/activemq-cpp/trunk/src/main/decaf/net/SocketTimeoutException.h
    activemq/activemq-cpp/trunk/src/main/decaf/net/URISyntaxException.h
    activemq/activemq-cpp/trunk/src/main/decaf/net/UnknownHostException.h
    activemq/activemq-cpp/trunk/src/main/decaf/net/UnknownServiceException.h
    activemq/activemq-cpp/trunk/src/main/decaf/nio/BufferOverflowException.h
    activemq/activemq-cpp/trunk/src/main/decaf/nio/BufferUnderflowException.h
    activemq/activemq-cpp/trunk/src/main/decaf/nio/InvalidMarkException.h
    activemq/activemq-cpp/trunk/src/main/decaf/nio/ReadOnlyBufferException.h
    activemq/activemq-cpp/trunk/src/main/decaf/security/GeneralSecurityException.h
    activemq/activemq-cpp/trunk/src/main/decaf/security/InvalidKeyException.h
    activemq/activemq-cpp/trunk/src/main/decaf/security/KeyException.h
    activemq/activemq-cpp/trunk/src/main/decaf/security/NoSuchAlgorithmException.h
    activemq/activemq-cpp/trunk/src/main/decaf/security/NoSuchProviderException.h
    activemq/activemq-cpp/trunk/src/main/decaf/security/SignatureException.h
    activemq/activemq-cpp/trunk/src/test/activemq/exceptions/ActiveMQExceptionTest.cpp
    activemq/activemq-cpp/trunk/src/test/activemq/exceptions/ActiveMQExceptionTest.h
    activemq/activemq-cpp/trunk/src/test/decaf/lang/ExceptionTest.cpp
    activemq/activemq-cpp/trunk/src/test/decaf/lang/ExceptionTest.h

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/ConnectorException.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/ConnectorException.h?rev=688327&r1=688326&r2=688327&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/ConnectorException.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/ConnectorException.h Sat Aug 23 07:07:59 2008
@@ -53,9 +53,40 @@
         }
 
         /**
-         * Consturctor
-         * @param file name of the file were the exception occured.
-         * @param lineNumber line where the exception occured
+         * Constructor - Initializes the file name and line number where
+         * this message occurred.  Sets the message to report, using an
+         * optional list of arguments to parse into the message
+         * @param file name where exception occurs
+         * @param line number where the exception occurred.
+         * @param cause The exception that was the cause for this one to be thrown.
+         * @param message to report
+         * @param list of primitives that are formatted into the message
+         */
+        ConnectorException( const char* file, const int lineNumber,
+                            const std::exception* cause,
+                            const char* msg, ... )
+        throw() : exceptions::ActiveMQException( cause )
+        {
+            va_list vargs;
+            va_start( vargs, msg );
+            buildMessage( msg, vargs );
+
+            // Set the first mark for this exception.
+            setMark( file, lineNumber );
+        }
+
+        /**
+         * Constructor
+         * @param cause Pointer to the exception that caused this one to
+         * be thrown, the object is cloned caller retains ownership.
+         */
+        ConnectorException( const std::exception* cause )
+            throw() : exceptions::ActiveMQException( cause ) {}
+
+        /**
+         * Constructor
+         * @param file name of the file were the exception occurred.
+         * @param lineNumber line where the exception occurred
          * @param msg the message that was generated
          */
         ConnectorException( const char* file,

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireConnectorException.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireConnectorException.h?rev=688327&r1=688326&r2=688327&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireConnectorException.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireConnectorException.h Sat Aug 23 07:07:59 2008
@@ -43,6 +43,37 @@
             *( exceptions::ActiveMQException* )this = ex;
         }
 
+        /**
+         * Constructor - Initializes the file name and line number where
+         * this message occurred.  Sets the message to report, using an
+         * optional list of arguments to parse into the message
+         * @param file name where exception occurs
+         * @param line number where the exception occurred.
+         * @param cause The exception that was the cause for this one to be thrown.
+         * @param message to report
+         * @param list of primitives that are formatted into the message
+         */
+        OpenWireConnectorException( const char* file, const int lineNumber,
+                                    const std::exception* cause,
+                                    const char* msg, ... )
+        throw() : connector::ConnectorException( cause )
+        {
+            va_list vargs;
+            va_start( vargs, msg );
+            buildMessage( msg, vargs );
+
+            // Set the first mark for this exception.
+            setMark( file, lineNumber );
+        }
+
+        /**
+         * Constructor
+         * @param cause Pointer to the exception that caused this one to
+         * be thrown, the object is cloned caller retains ownership.
+         */
+        OpenWireConnectorException( const std::exception* cause )
+            throw() : connector::ConnectorException( cause ) {}
+
         OpenWireConnectorException( const char* file,
                                     const int lineNumber,
                                     const char* msg, ... ) throw()

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompConnectorException.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompConnectorException.h?rev=688327&r1=688326&r2=688327&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompConnectorException.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompConnectorException.h Sat Aug 23 07:07:59 2008
@@ -54,6 +54,37 @@
         }
 
         /**
+         * Constructor - Initializes the file name and line number where
+         * this message occurred.  Sets the message to report, using an
+         * optional list of arguments to parse into the message
+         * @param file name where exception occurs
+         * @param line number where the exception occurred.
+         * @param cause The exception that was the cause for this one to be thrown.
+         * @param message to report
+         * @param list of primitives that are formatted into the message
+         */
+        StompConnectorException( const char* file, const int lineNumber,
+                                 const std::exception* cause,
+                                 const char* msg, ... )
+        throw() : connector::ConnectorException( cause )
+        {
+            va_list vargs;
+            va_start( vargs, msg );
+            buildMessage( msg, vargs );
+
+            // Set the first mark for this exception.
+            setMark( file, lineNumber );
+        }
+
+        /**
+         * Constructor
+         * @param cause Pointer to the exception that caused this one to
+         * be thrown, the object is cloned caller retains ownership.
+         */
+        StompConnectorException( const std::exception* cause )
+            throw() : connector::ConnectorException( cause ) {}
+
+        /**
          * Consturctor
          * @param file name of the file were the exception occured.
          * @param lineNumber line where the exception occured

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/marshal/MarshalException.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/marshal/MarshalException.h?rev=688327&r1=688326&r2=688327&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/marshal/MarshalException.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/marshal/MarshalException.h Sat Aug 23 07:07:59 2008
@@ -55,9 +55,40 @@
         }
 
         /**
-         * Consturctor
-         * @param file name of the file were the exception occured.
-         * @param lineNumber line where the exception occured
+         * Constructor - Initializes the file name and line number where
+         * this message occurred.  Sets the message to report, using an
+         * optional list of arguments to parse into the message
+         * @param file name where exception occurs
+         * @param line number where the exception occurred.
+         * @param cause The exception that was the cause for this one to be thrown.
+         * @param message to report
+         * @param list of primitives that are formatted into the message
+         */
+        MarshalException( const char* file, const int lineNumber,
+                          const std::exception* cause,
+                          const char* msg, ... )
+        throw() : exceptions::ActiveMQException( cause )
+        {
+            va_list vargs;
+            va_start( vargs, msg );
+            buildMessage( msg, vargs );
+
+            // Set the first mark for this exception.
+            setMark( file, lineNumber );
+        }
+
+        /**
+         * Constructor
+         * @param cause Pointer to the exception that caused this one to
+         * be thrown, the object is cloned caller retains ownership.
+         */
+        MarshalException( const std::exception* cause )
+            throw() : exceptions::ActiveMQException( cause ) {}
+
+        /**
+         * Constructor
+         * @param file name of the file were the exception occurred.
+         * @param lineNumber line where the exception occurred
          * @param msg the message that was generated
          */
         MarshalException( const char* file,

Modified: activemq/activemq-cpp/trunk/src/main/activemq/exceptions/ActiveMQException.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/exceptions/ActiveMQException.cpp?rev=688327&r1=688326&r2=688327&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/exceptions/ActiveMQException.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/exceptions/ActiveMQException.cpp Sat Aug 23 07:07:59 2008
@@ -29,30 +29,35 @@
 #endif
 
 ////////////////////////////////////////////////////////////////////////////////
-ActiveMQException::ActiveMQException() throw(){
+ActiveMQException::ActiveMQException() throw() : decaf::lang::Exception() {
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 ActiveMQException::ActiveMQException( const ActiveMQException& ex ) throw()
-: cms::CMSException(),
-  decaf::lang::Exception() {
+:   cms::CMSException(),
+    decaf::lang::Exception() {
 
   this->message = ex.getMessage();
   this->stackTrace = ex.getStackTrace();
+  this->initCause( ex.cause );
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 ActiveMQException::ActiveMQException( const Exception& ex ) throw()
-: cms::CMSException() {
+:   cms::CMSException(),
+    decaf::lang::Exception() {
 
   this->message = ex.getMessage();
   this->stackTrace = ex.getStackTrace();
+  this->initCause( &ex );
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 ActiveMQException::ActiveMQException( const char* file, const int lineNumber,
                    const char* msg, ... ) throw()
-{
+:   cms::CMSException(),
+    decaf::lang::Exception() {
+
     va_list vargs;
     va_start( vargs, msg ) ;
     buildMessage( msg, vargs );

Modified: activemq/activemq-cpp/trunk/src/main/activemq/exceptions/ActiveMQException.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/exceptions/ActiveMQException.h?rev=688327&r1=688326&r2=688327&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/exceptions/ActiveMQException.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/exceptions/ActiveMQException.h Sat Aug 23 07:07:59 2008
@@ -75,12 +75,6 @@
          * Assignment operator.
          * @param const reference to another ActiveMQException
          */
-        //virtual ActiveMQException& operator =( const ActiveMQException& ex );
-
-        /**
-         * Assignment operator.
-         * @param const reference to another ActiveMQException
-         */
         virtual ActiveMQException& operator =( const Exception& ex );
 
         /**
@@ -93,6 +87,19 @@
         }
 
         /**
+         * Gets the exception that caused this one to be thrown, this allows
+         * for chaining of exceptions in the case of a method that throws only
+         * a particular exception but wishes to allow for the real causal
+         * exception to be passed only in case the caller knows about that
+         * type of exception and wishes to respond to it.
+         * @returns a const pointer reference to the causal exception, if there
+         * was no cause associated with this exception then NULL is returned.
+         */
+        virtual const std::exception* getCause() const {
+            return decaf::lang::Exception::getCause();
+        }
+
+        /**
          * Adds a file/line number to the stack trace.
          *
          * @param file
@@ -105,15 +112,6 @@
         }
 
         /**
-         * Clones this exception.  This is useful for cases where you need
-         * to preserve the type of the original exception as well as the message.
-         * All subclasses should override.
-         *
-         * @return Copy of this Exception object
-         */
-        //virtual CMSException* clone() const = 0
-
-        /**
          * Provides the stack trace for every point where
          * this exception was caught, marked, and rethrown.
          *

Modified: activemq/activemq-cpp/trunk/src/main/activemq/transport/CommandIOException.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/transport/CommandIOException.h?rev=688327&r1=688326&r2=688327&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/transport/CommandIOException.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/transport/CommandIOException.h Sat Aug 23 07:07:59 2008
@@ -51,9 +51,40 @@
         }
 
         /**
-         * Consturctor
-         * @param file name of the file were the exception occured.
-         * @param lineNumber line where the exception occured
+         * Constructor - Initializes the file name and line number where
+         * this message occurred.  Sets the message to report, using an
+         * optional list of arguments to parse into the message
+         * @param file name where exception occurs
+         * @param line number where the exception occurred.
+         * @param cause The exception that was the cause for this one to be thrown.
+         * @param message to report
+         * @param list of primitives that are formatted into the message
+         */
+        CommandIOException( const char* file, const int lineNumber,
+                            const std::exception* cause,
+                            const char* msg, ... )
+        throw() : decaf::io::IOException( cause )
+        {
+            va_list vargs;
+            va_start( vargs, msg );
+            buildMessage( msg, vargs );
+
+            // Set the first mark for this exception.
+            setMark( file, lineNumber );
+        }
+
+        /**
+         * Constructor
+         * @param cause Pointer to the exception that caused this one to
+         * be thrown, the object is cloned caller retains ownership.
+         */
+        CommandIOException( const std::exception* cause )
+            throw() : decaf::io::IOException( cause ) {}
+
+        /**
+         * Constructor
+         * @param file name of the file were the exception occurred.
+         * @param lineNumber line where the exception occurred
          * @param msg the message that was generated
          */
         CommandIOException( const char* file,

Modified: activemq/activemq-cpp/trunk/src/main/cms/CMSException.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/cms/CMSException.h?rev=688327&r1=688326&r2=688327&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/cms/CMSException.h (original)
+++ activemq/activemq-cpp/trunk/src/main/cms/CMSException.h Sat Aug 23 07:07:59 2008
@@ -14,10 +14,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
+
 #ifndef CMS_CMSEXCEPTION_H
 #define CMS_CMSEXCEPTION_H
- 
+
 // Includes
 #include <string>
 #include <vector>
@@ -27,72 +27,83 @@
 #include <cms/Config.h>
 
 namespace cms{
-    
+
     /**
-     * This class represents an error that has occurred in 
+     * This class represents an error that has occurred in
      * cms.
      */
     class CMS_API CMSException : public std::exception {
-        
+
     public:
-        
+
         CMSException() throw() {}
-        
+
         virtual ~CMSException() throw() {}
-        
+
         /**
          * Gets the cause of the error.
-         * 
+         *
          * @return string errors message
          */
         virtual std::string getMessage() const = 0;
-        
+
+        /**
+         * Gets the exception that caused this one to be thrown, this allows
+         * for chaining of exceptions in the case of a method that throws only
+         * a particular exception but wishes to allow for the real causal
+         * exception to be passed only in case the caller knows about that
+         * type of exception and wishes to respond to it.
+         * @returns a const pointer reference to the causal exception, if there
+         * was no cause associated with this exception then NULL is returned.
+         */
+        virtual const std::exception* getCause() const = 0;
+
         /**
          * Adds a file/line number to the stack trace.
-         * 
-         * @param file 
+         *
+         * @param file
          *      The name of the file calling this method (use __FILE__).
-         * @param lineNumber 
+         * @param lineNumber
          *      The line number in the calling file (use __LINE__).
          */
         virtual void setMark( const char* file, const int lineNumber ) = 0;
-        
+
         /**
          * Clones this exception.  This is useful for cases where you need
          * to preserve the type of the original exception as well as the message.
          * All subclasses should override.
-         * 
+         *
          * @return Copy of this Exception object
          */
         virtual CMSException* clone() const = 0;
-        
+
         /**
          * Provides the stack trace for every point where
          * this exception was caught, marked, and rethrown.
-         * 
+         *
          * @return vector containing stack trace strings
          */
         virtual std::vector< std::pair< std::string, int> > getStackTrace() const = 0;
-        
+
         /**
          * Prints the stack trace to std::err
          */
         virtual void printStackTrace() const = 0;
-        
+
         /**
          * Prints the stack trace to the given output stream.
-         * 
+         *
          * @param stream the target output stream.
          */
         virtual void printStackTrace( std::ostream& stream ) const = 0;
-        
+
         /**
          * Gets the stack trace as one contiguous string.
-         * 
+         *
          * @return string with formatted stack trace data
          */
         virtual std::string getStackTraceString() const = 0;
-        
+
     };
 
 }

Modified: activemq/activemq-cpp/trunk/src/main/decaf/io/EOFException.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/decaf/io/EOFException.h?rev=688327&r1=688326&r2=688327&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/decaf/io/EOFException.h (original)
+++ activemq/activemq-cpp/trunk/src/main/decaf/io/EOFException.h Sat Aug 23 07:07:59 2008
@@ -56,9 +56,38 @@
         }
 
         /**
-         * Consturctor
-         * @param file name of the file were the exception occured.
-         * @param lineNumber line where the exception occured
+         * Constructor - Initializes the file name and line number where
+         * this message occurred.  Sets the message to report, using an
+         * optional list of arguments to parse into the message
+         * @param file name where exception occurs
+         * @param line number where the exception occurred.
+         * @param cause The exception that was the cause for this one to be thrown.
+         * @param message to report
+         * @param list of primitives that are formatted into the message
+         */
+        EOFException( const char* file, const int lineNumber,
+                      const std::exception* cause,
+                      const char* msg, ... ) throw() : IOException( cause )
+        {
+            va_list vargs;
+            va_start( vargs, msg );
+            buildMessage( msg, vargs );
+
+            // Set the first mark for this exception.
+            setMark( file, lineNumber );
+        }
+
+        /**
+         * Constructor
+         * @param cause Pointer to the exception that caused this one to
+         * be thrown, the object is cloned caller retains ownership.
+         */
+        EOFException( const std::exception* cause ) throw() : IOException( cause ) {}
+
+        /**
+         * Constructor
+         * @param file name of the file were the exception occurred.
+         * @param lineNumber line where the exception occurred
          * @param msg the message that was generated
          */
         EOFException( const char* file, const int lineNumber,

Modified: activemq/activemq-cpp/trunk/src/main/decaf/io/IOException.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/decaf/io/IOException.h?rev=688327&r1=688326&r2=688327&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/decaf/io/IOException.h (original)
+++ activemq/activemq-cpp/trunk/src/main/decaf/io/IOException.h Sat Aug 23 07:07:59 2008
@@ -52,9 +52,38 @@
         }
 
         /**
-         * Consturctor
-         * @param file name of the file were the exception occured.
-         * @param lineNumber line where the exception occured
+         * Constructor - Initializes the file name and line number where
+         * this message occurred.  Sets the message to report, using an
+         * optional list of arguments to parse into the message
+         * @param file name where exception occurs
+         * @param line number where the exception occurred.
+         * @param cause The exception that was the cause for this one to be thrown.
+         * @param message to report
+         * @param list of primitives that are formatted into the message
+         */
+        IOException( const char* file, const int lineNumber,
+                     const std::exception* cause,
+                     const char* msg, ... ) throw() : lang::Exception( cause )
+        {
+            va_list vargs;
+            va_start( vargs, msg );
+            buildMessage( msg, vargs );
+
+            // Set the first mark for this exception.
+            setMark( file, lineNumber );
+        }
+
+        /**
+         * Constructor
+         * @param cause Pointer to the exception that caused this one to
+         * be thrown, the object is cloned caller retains ownership.
+         */
+        IOException( const std::exception* cause ) throw() : lang::Exception( cause ) {}
+
+        /**
+         * Constructor
+         * @param file name of the file were the exception occurred.
+         * @param lineNumber line where the exception occurred
          * @param msg the message that was generated
          */
         IOException( const char* file, const int lineNumber,

Modified: activemq/activemq-cpp/trunk/src/main/decaf/io/InterruptedIOException.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/decaf/io/InterruptedIOException.h?rev=688327&r1=688326&r2=688327&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/decaf/io/InterruptedIOException.h (original)
+++ activemq/activemq-cpp/trunk/src/main/decaf/io/InterruptedIOException.h Sat Aug 23 07:07:59 2008
@@ -53,9 +53,38 @@
         }
 
         /**
-         * Consturctor
-         * @param file name of the file were the exception occured.
-         * @param lineNumber line where the exception occured
+         * Constructor - Initializes the file name and line number where
+         * this message occurred.  Sets the message to report, using an
+         * optional list of arguments to parse into the message
+         * @param file name where exception occurs
+         * @param line number where the exception occurred.
+         * @param cause The exception that was the cause for this one to be thrown.
+         * @param message to report
+         * @param list of primitives that are formatted into the message
+         */
+        InterruptedIOException( const char* file, const int lineNumber,
+                                const std::exception* cause,
+                                const char* msg, ... ) throw() : IOException( cause )
+        {
+            va_list vargs;
+            va_start( vargs, msg );
+            buildMessage( msg, vargs );
+
+            // Set the first mark for this exception.
+            setMark( file, lineNumber );
+        }
+
+        /**
+         * Constructor
+         * @param cause Pointer to the exception that caused this one to
+         * be thrown, the object is cloned caller retains ownership.
+         */
+        InterruptedIOException( const std::exception* cause ) throw() : IOException( cause ) {}
+
+        /**
+         * Constructor
+         * @param file name of the file were the exception occurred.
+         * @param lineNumber line where the exception occurred
          * @param msg the message that was generated
          */
         InterruptedIOException( const char* file, const int lineNumber,

Modified: activemq/activemq-cpp/trunk/src/main/decaf/lang/Exception.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/decaf/lang/Exception.cpp?rev=688327&r1=688326&r2=688327&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/decaf/lang/Exception.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/decaf/lang/Exception.cpp Sat Aug 23 07:07:59 2008
@@ -29,17 +29,22 @@
 using namespace decaf::util::logging;
 
 ////////////////////////////////////////////////////////////////////////////////
-Exception::Exception() throw(){
+Exception::Exception() throw() : Throwable(), cause( NULL ) {
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-Exception::Exception( const Exception& ex ) throw() : Throwable() {
+Exception::Exception( const Exception& ex ) throw() : Throwable(), cause( NULL ) {
     *this = ex;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
+Exception::Exception( const std::exception* cause ) throw() : Throwable(), cause( NULL ) {
+    this->initCause( cause );
+}
+
+////////////////////////////////////////////////////////////////////////////////
 Exception::Exception( const char* file, const int lineNumber,
-                      const char* msg, ... ) throw() {
+                      const char* msg, ... ) throw() : Throwable(), cause( NULL ) {
     va_list vargs;
     va_start( vargs, msg ) ;
     buildMessage( msg, vargs );
@@ -50,7 +55,24 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
+Exception::Exception( const char* file, const int lineNumber,
+                      const std::exception* cause,
+                      const char* msg, ... ) throw() : Throwable(), cause( NULL ) {
+    va_list vargs;
+    va_start( vargs, msg ) ;
+    this->buildMessage( msg, vargs );
+    va_end( vargs );
+
+    // Store the cause
+    this->initCause( cause );
+
+    // Set the first mark for this exception.
+    this->setMark( file, lineNumber );
+}
+
+////////////////////////////////////////////////////////////////////////////////
 Exception::~Exception() throw(){
+    delete this->cause;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -137,5 +159,25 @@
 Exception& Exception::operator =( const Exception& ex ){
     this->message = ex.message;
     this->stackTrace = ex.stackTrace;
+    this->initCause( ex.cause );
     return *this;
 }
+
+////////////////////////////////////////////////////////////////////////////////
+void Exception::initCause( const std::exception* cause ) {
+
+    if( cause == NULL || cause == this ) {
+        return;
+    }
+
+    const Exception* ptrCause = dynamic_cast<const Exception*>( cause );
+    if( ptrCause == NULL ) {
+        this->cause = new Exception( __FILE__, __LINE__, cause->what() );
+    } else {
+        this->cause = ptrCause->clone();
+    }
+
+    if( this->message == "" ) {
+        this->message = cause->what();
+    }
+}

Modified: activemq/activemq-cpp/trunk/src/main/decaf/lang/Exception.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/decaf/lang/Exception.h?rev=688327&r1=688326&r2=688327&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/decaf/lang/Exception.h (original)
+++ activemq/activemq-cpp/trunk/src/main/decaf/lang/Exception.h Sat Aug 23 07:07:59 2008
@@ -42,6 +42,11 @@
         std::string message;
 
         /**
+         * The Exception that caused this one to be thrown.
+         */
+        std::exception* cause;
+
+        /**
          * The stack trace.
          */
         std::vector< std::pair< std::string, int> > stackTrace;
@@ -59,15 +64,36 @@
         Exception( const Exception& ex ) throw();
 
         /**
+         * Constructor
+         * @param cause Pointer to the exception that caused this one to
+         * be thrown, the object is cloned caller retains ownership.
+         */
+        Exception( const std::exception* cause ) throw();
+
+        /**
+         * Constructor - Initializes the file name and line number where
+         * this message occurred.  Sets the message to report, using an
+         * optional list of arguments to parse into the message
+         * @param file name where exception occurs
+         * @param line number where the exception occurred.
+         * @param message to report
+         * @param list of primitives that are formatted into the message
+         */
+        Exception( const char* file, const int lineNumber,
+                   const char* msg, ... ) throw();
+
+        /**
          * Constructor - Initializes the file name and line number where
-         * this message occured.  Sets the message to report, using an
+         * this message occurred.  Sets the message to report, using an
          * optional list of arguments to parse into the message
          * @param file name where exception occurs
          * @param line number where the exception occurred.
+         * @param cause The exception that was the cause for this one to be thrown.
          * @param message to report
          * @param list of primitives that are formatted into the message
          */
         Exception( const char* file, const int lineNumber,
+                   const std::exception* cause,
                    const char* msg, ... ) throw();
 
         virtual ~Exception() throw();
@@ -81,6 +107,26 @@
         }
 
         /**
+         * Gets the exception that caused this one to be thrown, this allows
+         * for chaining of exceptions in the case of a method that throws only
+         * a particular exception but wishes to allow for the real causal
+         * exception to be passed only in case the caller knows about that
+         * type of exception and wishes to respond to it.
+         * @returns a const pointer reference to the causal exception, if there
+         * was no cause associated with this exception then NULL is returned.
+         */
+        virtual const std::exception* getCause() const {
+            return this->cause;
+        }
+
+        /**
+         * Initializes the contained cause exception with the one given.  A copy
+         * is made to avoid ownership issues.
+         * @param cause The exception that was the cause of this one.
+         */
+        virtual void initCause( const std::exception* cause );
+
+        /**
          * Implement method from std::exception
          * @return the const char* of <code>getMessage()</code>.
          */

Modified: activemq/activemq-cpp/trunk/src/main/decaf/lang/Throwable.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/decaf/lang/Throwable.h?rev=688327&r1=688326&r2=688327&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/decaf/lang/Throwable.h (original)
+++ activemq/activemq-cpp/trunk/src/main/decaf/lang/Throwable.h Sat Aug 23 07:07:59 2008
@@ -33,7 +33,6 @@
      * This class represents an error that has occurred.
      */
     class DECAF_API Throwable : public std::exception {
-
     public:
 
         Throwable() throw() {}
@@ -41,12 +40,32 @@
         virtual ~Throwable() throw() {}
 
         /**
-         * Gets the cause of the error.
+         * Gets the cause of the error, if no message was provided to the instance
+         * of this interface but a cause was then the value cause.getMessage is
+         * then returned.
          * @return string errors message
          */
         virtual std::string getMessage() const = 0;
 
         /**
+         * Gets the exception that caused this one to be thrown, this allows
+         * for chaining of exceptions in the case of a method that throws only
+         * a particular exception but wishes to allow for the real causal
+         * exception to be passed only in case the caller knows about that
+         * type of exception and wishes to respond to it.
+         * @returns a const pointer reference to the causal exception, if there
+         * was no cause associated with this exception then NULL is returned.
+         */
+        virtual const std::exception* getCause() const = 0;
+
+        /**
+         * Initializes the contained cause exception with the one given.  A copy
+         * is made to avoid ownership issues.
+         * @param cause The exception that was the cause of this one.
+         */
+        virtual void initCause( const std::exception* cause ) = 0;
+
+        /**
          * Adds a file/line number to the stack trace.
          * @param file The name of the file calling this method (use __FILE__).
          * @param lineNumber The line number in the calling file (use __LINE__).

Modified: activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/ExceptionDefines.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/ExceptionDefines.h?rev=688327&r1=688326&r2=688327&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/ExceptionDefines.h (original)
+++ activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/ExceptionDefines.h Sat Aug 23 07:07:59 2008
@@ -38,7 +38,7 @@
  */
 #define DECAF_CATCH_EXCEPTION_CONVERT( sourceType, targetType ) \
     catch( sourceType& ex ){ \
-        targetType target( ex ); \
+        targetType target( &ex ); \
         target.setMark( __FILE__, __LINE__ ); \
         throw target; \
     }

Modified: activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/IllegalArgumentException.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/IllegalArgumentException.h?rev=688327&r1=688326&r2=688327&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/IllegalArgumentException.h (original)
+++ activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/IllegalArgumentException.h Sat Aug 23 07:07:59 2008
@@ -33,7 +33,7 @@
         /**
          * Default Constructor
          */
-        IllegalArgumentException() throw() {}
+        IllegalArgumentException() throw() : Exception() {}
 
         /**
          * Conversion Constructor from some other Exception
@@ -55,8 +55,16 @@
         }
 
         /**
+         * Constructor
+         * @param cause Pointer to the exception that caused this one to
+         * be thrown, the object is cloned caller retains ownership.
+         */
+        IllegalArgumentException( const std::exception* cause )
+            throw() : Exception( cause ) {}
+
+        /**
          * Constructor - Initializes the file name and line number where
-         * this message occured.  Sets the message to report, using an
+         * this message occurred.  Sets the message to report, using an
          * optional list of arguments to parse into the message
          * @param file name where exception occurs
          * @param line number where the exception occurred.
@@ -65,11 +73,35 @@
          */
         IllegalArgumentException(const char* file, const int lineNumber,
             const char* msg, ...) throw()
-        : Exception()
+            : Exception()
+        {
+
+            va_list vargs;
+            va_start( vargs, msg );
+            buildMessage( msg, vargs );
+
+            // Set the first mark for this exception.
+            setMark( file, lineNumber );
+        }
+
+        /**
+         * Constructor - Initializes the file name and line number where
+         * this message occurred.  Sets the message to report, using an
+         * optional list of arguments to parse into the message
+         * @param file name where exception occurs
+         * @param line number where the exception occurred.
+         * @param cause The exception that was the cause for this one to be thrown.
+         * @param message to report
+         * @param list of primitives that are formatted into the message
+         */
+        IllegalArgumentException( const char* file, const int lineNumber,
+                                  const std::exception* cause,
+                                  const char* msg, ... ) throw()
+            : Exception( cause )
         {
             va_list vargs ;
-            va_start(vargs, msg) ;
-            buildMessage(msg, vargs) ;
+            va_start( vargs, msg );
+            buildMessage( msg, vargs );
 
             // Set the first mark for this exception.
             setMark( file, lineNumber );
@@ -80,7 +112,7 @@
          * to preserve the type of the original exception as well as the message.
          * All subclasses should override.
          */
-        virtual Exception* clone() const{
+        virtual IllegalArgumentException* clone() const{
             return new IllegalArgumentException( *this );
         }
 

Modified: activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/IllegalMonitorStateException.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/IllegalMonitorStateException.h?rev=688327&r1=688326&r2=688327&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/IllegalMonitorStateException.h (original)
+++ activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/IllegalMonitorStateException.h Sat Aug 23 07:07:59 2008
@@ -57,7 +57,7 @@
 
         /**
          * Constructor - Initializes the file name and line number where
-         * this message occured.  Sets the message to report, using an
+         * this message occurred.  Sets the message to report, using an
          * optional list of arguments to parse into the message
          * @param file name where exception occurs
          * @param line number where the exception occurred.
@@ -69,11 +69,43 @@
                                       const char* msg, ...) throw()
         {
             va_list vargs;
-            va_start(vargs, msg);
-            buildMessage(msg, vargs);
+            va_start( vargs, msg);
+            buildMessage( msg, vargs );
 
             // Set the first mark for this exception.
-            setMark(file, lineNumber);
+            setMark( file, lineNumber );
+        }
+
+        /**
+         * Constructor - Initializes the file name and line number where
+         * this message occurred.  Sets the message to report, using an
+         * optional list of arguments to parse into the message
+         * @param file name where exception occurs
+         * @param line number where the exception occurred.
+         * @param cause The exception that was the cause for this one to be thrown.
+         * @param message to report
+         * @param list of primitives that are formatted into the message
+         */
+        IllegalMonitorStateException( const char* file, const int lineNumber,
+                                      const std::exception* cause,
+                                      const char* msg, ... ) throw()
+            : Exception( cause ) {
+
+            va_list vargs ;
+            va_start( vargs, msg );
+            buildMessage( msg, vargs );
+
+            // Set the first mark for this exception.
+            setMark( file, lineNumber );
+        }
+
+        /**
+         * Constructor
+         * @param cause Pointer to the exception that caused this one to
+         * be thrown, the object is cloned caller retains ownership.
+         */
+        IllegalMonitorStateException( const std::exception* cause ) throw()
+            : Exception( cause ) {
         }
 
         /**

Modified: activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/IllegalStateException.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/IllegalStateException.h?rev=688327&r1=688326&r2=688327&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/IllegalStateException.h (original)
+++ activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/IllegalStateException.h Sat Aug 23 07:07:59 2008
@@ -70,14 +70,43 @@
         : Exception()
         {
             va_list vargs;
-            va_start(vargs, msg);
-            buildMessage(msg, vargs);
+            va_start( vargs, msg );
+            buildMessage( msg, vargs );
 
             // Set the first mark for this exception.
-            setMark(file, lineNumber);
+            setMark( file, lineNumber );
         }
 
         /**
+         * Constructor - Initializes the file name and line number where
+         * this message occurred.  Sets the message to report, using an
+         * optional list of arguments to parse into the message
+         * @param file name where exception occurs
+         * @param line number where the exception occurred.
+         * @param cause The exception that was the cause for this one to be thrown.
+         * @param message to report
+         * @param list of primitives that are formatted into the message
+         */
+        IllegalStateException( const char* file, const int lineNumber,
+                               const std::exception* cause,
+                               const char* msg, ... ) throw() : Exception( cause )
+        {
+            va_list vargs;
+            va_start( vargs, msg );
+            buildMessage( msg, vargs );
+
+            // Set the first mark for this exception.
+            setMark( file, lineNumber );
+        }
+
+        /**
+         * Constructor
+         * @param cause Pointer to the exception that caused this one to
+         * be thrown, the object is cloned caller retains ownership.
+         */
+        IllegalStateException( const std::exception* cause ) throw() : Exception( cause ) {}
+
+        /**
          * Clones this exception.  This is useful for cases where you need
          * to preserve the type of the original exception as well as the message.
          * All subclasses should override.

Modified: activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/IndexOutOfBoundsException.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/IndexOutOfBoundsException.h?rev=688327&r1=688326&r2=688327&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/IndexOutOfBoundsException.h (original)
+++ activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/IndexOutOfBoundsException.h Sat Aug 23 07:07:59 2008
@@ -76,6 +76,38 @@
       }
 
       /**
+       * Constructor - Initializes the file name and line number where
+       * this message occurred.  Sets the message to report, using an
+       * optional list of arguments to parse into the message
+       * @param file name where exception occurs
+       * @param line number where the exception occurred.
+       * @param cause The exception that was the cause for this one to be thrown.
+       * @param message to report
+       * @param list of primitives that are formatted into the message
+       */
+      IndexOutOfBoundsException( const char* file, const int lineNumber,
+                                 const std::exception* cause,
+                                 const char* msg, ... ) throw()
+          : Exception( cause ) {
+
+          va_list vargs;
+          va_start( vargs, msg );
+          buildMessage( msg, vargs );
+
+          // Set the first mark for this exception.
+          setMark( file, lineNumber );
+      }
+
+      /**
+       * Constructor
+       * @param cause Pointer to the exception that caused this one to
+       * be thrown, the object is cloned caller retains ownership.
+       */
+      IndexOutOfBoundsException( const std::exception* cause ) throw()
+          : Exception( cause ) {
+      }
+
+      /**
        * Clones this exception.  This is useful for cases where you need
        * to preserve the type of the original exception as well as the message.
        * All subclasses should override.

Modified: activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/InterruptedException.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/InterruptedException.h?rev=688327&r1=688326&r2=688327&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/InterruptedException.h (original)
+++ activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/InterruptedException.h Sat Aug 23 07:07:59 2008
@@ -56,7 +56,40 @@
 
         /**
          * Constructor - Initializes the file name and line number where
-         * this message occured.  Sets the message to report, using an
+         * this message occurred.  Sets the message to report, using an
+         * optional list of arguments to parse into the message
+         * @param file name where exception occurs
+         * @param line number where the exception occurred.
+         * @param cause The exception that was the cause for this one to be thrown.
+         * @param message to report
+         * @param list of primitives that are formatted into the message
+         */
+        InterruptedException( const char* file, const int lineNumber,
+                              const std::exception* cause,
+                              const char* msg, ... ) throw()
+            : Exception( cause )
+        {
+
+            va_list vargs;
+            va_start( vargs, msg );
+            buildMessage( msg, vargs );
+
+            // Set the first mark for this exception.
+            setMark( file, lineNumber );
+        }
+
+        /**
+         * Constructor
+         * @param cause Pointer to the exception that caused this one to
+         * be thrown, the object is cloned caller retains ownership.
+         */
+        InterruptedException( const std::exception* cause ) throw()
+            : Exception( cause ) {
+        }
+
+        /**
+         * Constructor - Initializes the file name and line number where
+         * this message occurred.  Sets the message to report, using an
          * optional list of arguments to parse into the message
          * @param file name where exception occurs
          * @param line number where the exception occurred.
@@ -69,11 +102,11 @@
         : Exception()
         {
             va_list vargs;
-            va_start(vargs, msg);
-            buildMessage(msg, vargs);
+            va_start( vargs, msg );
+            buildMessage( msg, vargs );
 
             // Set the first mark for this exception.
-            setMark(file, lineNumber);
+            setMark( file, lineNumber );
         }
 
         /**

Modified: activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/InvalidStateException.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/InvalidStateException.h?rev=688327&r1=688326&r2=688327&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/InvalidStateException.h (original)
+++ activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/InvalidStateException.h Sat Aug 23 07:07:59 2008
@@ -57,7 +57,39 @@
 
         /**
          * Constructor - Initializes the file name and line number where
-         * this message occured.  Sets the message to report, using an
+         * this message occurred.  Sets the message to report, using an
+         * optional list of arguments to parse into the message
+         * @param file name where exception occurs
+         * @param line number where the exception occurred.
+         * @param cause The exception that was the cause for this one to be thrown.
+         * @param message to report
+         * @param list of primitives that are formatted into the message
+         */
+        InvalidStateException( const char* file, const int lineNumber,
+                               const std::exception* cause,
+                               const char* msg, ... ) throw()
+            : Exception( cause )
+        {
+            va_list vargs;
+            va_start( vargs, msg );
+            buildMessage( msg, vargs );
+
+            // Set the first mark for this exception.
+            setMark( file, lineNumber );
+        }
+
+        /**
+         * Constructor
+         * @param cause Pointer to the exception that caused this one to
+         * be thrown, the object is cloned caller retains ownership.
+         */
+        InvalidStateException( const std::exception* cause ) throw()
+            : Exception( cause ) {
+        }
+
+        /**
+         * Constructor - Initializes the file name and line number where
+         * this message occurred.  Sets the message to report, using an
          * optional list of arguments to parse into the message
          * @param file name where exception occurs
          * @param line number where the exception occurred.

Modified: activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/NoSuchElementException.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/NoSuchElementException.h?rev=688327&r1=688326&r2=688327&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/NoSuchElementException.h (original)
+++ activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/NoSuchElementException.h Sat Aug 23 07:07:59 2008
@@ -57,6 +57,35 @@
 
         /**
          * Constructor - Initializes the file name and line number where
+         * this message occurred.  Sets the message to report, using an
+         * optional list of arguments to parse into the message
+         * @param file name where exception occurs
+         * @param line number where the exception occurred.
+         * @param cause The exception that was the cause for this one to be thrown.
+         * @param message to report
+         * @param list of primitives that are formatted into the message
+         */
+        NoSuchElementException( const char* file, const int lineNumber,
+                                const std::exception* cause,
+                                const char* msg, ... ) throw() : Exception( cause )
+        {
+            va_list vargs;
+            va_start( vargs, msg );
+            buildMessage( msg, vargs );
+
+            // Set the first mark for this exception.
+            setMark( file, lineNumber );
+        }
+
+        /**
+         * Constructor
+         * @param cause Pointer to the exception that caused this one to
+         * be thrown, the object is cloned caller retains ownership.
+         */
+        NoSuchElementException( const std::exception* cause ) throw() : Exception( cause ) {}
+
+        /**
+         * Constructor - Initializes the file name and line number where
          * this message occured.  Sets the message to report, using an
          * optional list of arguments to parse into the message
          * @param file name where exception occurs

Modified: activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/NullPointerException.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/NullPointerException.h?rev=688327&r1=688326&r2=688327&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/NullPointerException.h (original)
+++ activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/NullPointerException.h Sat Aug 23 07:07:59 2008
@@ -57,6 +57,35 @@
 
         /**
          * Constructor - Initializes the file name and line number where
+         * this message occurred.  Sets the message to report, using an
+         * optional list of arguments to parse into the message
+         * @param file name where exception occurs
+         * @param line number where the exception occurred.
+         * @param cause The exception that was the cause for this one to be thrown.
+         * @param message to report
+         * @param list of primitives that are formatted into the message
+         */
+        NullPointerException( const char* file, const int lineNumber,
+                              const std::exception* cause,
+                              const char* msg, ... ) throw() : Exception( cause )
+        {
+            va_list vargs;
+            va_start( vargs, msg );
+            buildMessage( msg, vargs );
+
+            // Set the first mark for this exception.
+            setMark( file, lineNumber );
+        }
+
+        /**
+         * Constructor
+         * @param cause Pointer to the exception that caused this one to
+         * be thrown, the object is cloned caller retains ownership.
+         */
+        NullPointerException( const std::exception* cause ) throw() : Exception( cause ) {}
+
+        /**
+         * Constructor - Initializes the file name and line number where
          * this message occured.  Sets the message to report, using an
          * optional list of arguments to parse into the message
          * @param file name where exception occurs

Modified: activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/NumberFormatException.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/NumberFormatException.h?rev=688327&r1=688326&r2=688327&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/NumberFormatException.h (original)
+++ activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/NumberFormatException.h Sat Aug 23 07:07:59 2008
@@ -56,6 +56,35 @@
 
         /**
          * Constructor - Initializes the file name and line number where
+         * this message occurred.  Sets the message to report, using an
+         * optional list of arguments to parse into the message
+         * @param file name where exception occurs
+         * @param line number where the exception occurred.
+         * @param cause The exception that was the cause for this one to be thrown.
+         * @param message to report
+         * @param list of primitives that are formatted into the message
+         */
+        NumberFormatException( const char* file, const int lineNumber,
+                               const std::exception* cause,
+                               const char* msg, ... ) throw() : Exception( cause )
+        {
+            va_list vargs;
+            va_start( vargs, msg );
+            buildMessage( msg, vargs );
+
+            // Set the first mark for this exception.
+            setMark( file, lineNumber );
+        }
+
+        /**
+         * Constructor
+         * @param cause Pointer to the exception that caused this one to
+         * be thrown, the object is cloned caller retains ownership.
+         */
+        NumberFormatException( const std::exception* cause ) throw() : Exception( cause ) {}
+
+        /**
+         * Constructor - Initializes the file name and line number where
          * this message occured.  Sets the message to report, using an
          * optional list of arguments to parse into the message
          * @param file name where exception occurs

Modified: activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/RuntimeException.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/RuntimeException.h?rev=688327&r1=688326&r2=688327&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/RuntimeException.h (original)
+++ activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/RuntimeException.h Sat Aug 23 07:07:59 2008
@@ -58,7 +58,36 @@
 
         /**
          * Constructor - Initializes the file name and line number where
-         * this message occured.  Sets the message to report, using an
+         * this message occurred.  Sets the message to report, using an
+         * optional list of arguments to parse into the message
+         * @param file name where exception occurs
+         * @param line number where the exception occurred.
+         * @param cause The exception that was the cause for this one to be thrown.
+         * @param message to report
+         * @param list of primitives that are formatted into the message
+         */
+        RuntimeException( const char* file, const int lineNumber,
+                          const std::exception* cause,
+                          const char* msg, ... ) throw() : Exception( cause )
+        {
+            va_list vargs;
+            va_start( vargs, msg );
+            buildMessage( msg, vargs );
+
+            // Set the first mark for this exception.
+            setMark( file, lineNumber );
+        }
+
+        /**
+         * Constructor
+         * @param cause Pointer to the exception that caused this one to
+         * be thrown, the object is cloned caller retains ownership.
+         */
+        RuntimeException( const std::exception* cause ) throw() : Exception( cause ) {}
+
+        /**
+         * Constructor - Initializes the file name and line number where
+         * this message occurred.  Sets the message to report, using an
          * optional list of arguments to parse into the message
          * @param file name where exception occurs
          * @param line number where the exception occurred.
@@ -71,11 +100,11 @@
         : Exception()
         {
             va_list vargs;
-            va_start(vargs, msg);
-            buildMessage(msg, vargs);
+            va_start( vargs, msg );
+            buildMessage( msg, vargs );
 
             // Set the first mark for this exception.
-            setMark(file, lineNumber);
+            setMark( file, lineNumber );
         }
 
         /**

Modified: activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/UnsupportedOperationException.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/UnsupportedOperationException.h?rev=688327&r1=688326&r2=688327&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/UnsupportedOperationException.h (original)
+++ activemq/activemq-cpp/trunk/src/main/decaf/lang/exceptions/UnsupportedOperationException.h Sat Aug 23 07:07:59 2008
@@ -56,7 +56,37 @@
 
         /**
          * Constructor - Initializes the file name and line number where
-         * this message occured.  Sets the message to report, using an
+         * this message occurred.  Sets the message to report, using an
+         * optional list of arguments to parse into the message
+         * @param file name where exception occurs
+         * @param line number where the exception occurred.
+         * @param cause The exception that was the cause for this one to be thrown.
+         * @param message to report
+         * @param list of primitives that are formatted into the message
+         */
+        UnsupportedOperationException( const char* file, const int lineNumber,
+                               const std::exception* cause,
+                               const char* msg, ... ) throw() : Exception( cause )
+        {
+            va_list vargs;
+            va_start( vargs, msg );
+            buildMessage( msg, vargs );
+
+            // Set the first mark for this exception.
+            setMark( file, lineNumber );
+        }
+
+        /**
+         * Constructor
+         * @param cause Pointer to the exception that caused this one to
+         * be thrown, the object is cloned caller retains ownership.
+         */
+        UnsupportedOperationException( const std::exception* cause )
+            throw() : Exception( cause ) {}
+
+        /**
+         * Constructor - Initializes the file name and line number where
+         * this message occurred.  Sets the message to report, using an
          * optional list of arguments to parse into the message
          * @param file name where exception occurs
          * @param line number where the exception occurred.

Modified: activemq/activemq-cpp/trunk/src/main/decaf/net/BindException.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/decaf/net/BindException.h?rev=688327&r1=688326&r2=688327&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/decaf/net/BindException.h (original)
+++ activemq/activemq-cpp/trunk/src/main/decaf/net/BindException.h Sat Aug 23 07:07:59 2008
@@ -53,15 +53,46 @@
 
         /**
          * Constructor - Initializes the file name and line number where
-         * this message occured.  Sets the message to report, using an
+         * this message occurred.  Sets the message to report, using an
          * optional list of arguments to parse into the message
          * @param file name where exception occurs
          * @param line number where the exception occurred.
+         * @param cause The exception that was the cause for this one to be thrown.
          * @param message to report
          * @param list of primitives that are formatted into the message
          */
         BindException( const char* file, const int lineNumber,
-                            const char* msg, ... ) throw ()
+                       const std::exception* cause,
+                       const char* msg, ... )
+        throw() : SocketException( cause )
+        {
+            va_list vargs;
+            va_start( vargs, msg );
+            buildMessage( msg, vargs );
+
+            // Set the first mark for this exception.
+            setMark( file, lineNumber );
+        }
+
+        /**
+         * Constructor
+         * @param cause Pointer to the exception that caused this one to
+         * be thrown, the object is cloned caller retains ownership.
+         */
+        BindException( const std::exception* cause )
+            throw() : SocketException( cause ) {}
+
+        /**
+         * Constructor - Initializes the file name and line number where
+         * this message occurred.  Sets the message to report, using an
+         * optional list of arguments to parse into the message
+         * @param file name where exception occurs
+         * @param line number where the exception occurred.
+         * @param message to report
+         * @param list of primitives that are formatted into the message
+         */
+        BindException( const char* file, const int lineNumber,
+                       const char* msg, ... ) throw ()
         : SocketException()
         {
             va_list vargs ;

Modified: activemq/activemq-cpp/trunk/src/main/decaf/net/ConnectException.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/decaf/net/ConnectException.h?rev=688327&r1=688326&r2=688327&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/decaf/net/ConnectException.h (original)
+++ activemq/activemq-cpp/trunk/src/main/decaf/net/ConnectException.h Sat Aug 23 07:07:59 2008
@@ -53,15 +53,46 @@
 
         /**
          * Constructor - Initializes the file name and line number where
-         * this message occured.  Sets the message to report, using an
+         * this message occurred.  Sets the message to report, using an
          * optional list of arguments to parse into the message
          * @param file name where exception occurs
          * @param line number where the exception occurred.
+         * @param cause The exception that was the cause for this one to be thrown.
          * @param message to report
          * @param list of primitives that are formatted into the message
          */
         ConnectException( const char* file, const int lineNumber,
-                            const char* msg, ... ) throw ()
+                          const std::exception* cause,
+                          const char* msg, ... )
+        throw() : SocketException( cause )
+        {
+            va_list vargs;
+            va_start( vargs, msg );
+            buildMessage( msg, vargs );
+
+            // Set the first mark for this exception.
+            setMark( file, lineNumber );
+        }
+
+        /**
+         * Constructor
+         * @param cause Pointer to the exception that caused this one to
+         * be thrown, the object is cloned caller retains ownership.
+         */
+        ConnectException( const std::exception* cause )
+            throw() : SocketException( cause ) {}
+
+        /**
+         * Constructor - Initializes the file name and line number where
+         * this message occurred.  Sets the message to report, using an
+         * optional list of arguments to parse into the message
+         * @param file name where exception occurs
+         * @param line number where the exception occurred.
+         * @param message to report
+         * @param list of primitives that are formatted into the message
+         */
+        ConnectException( const char* file, const int lineNumber,
+                          const char* msg, ... ) throw ()
         : SocketException()
         {
             va_list vargs ;

Modified: activemq/activemq-cpp/trunk/src/main/decaf/net/HttpRetryException.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/decaf/net/HttpRetryException.h?rev=688327&r1=688326&r2=688327&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/decaf/net/HttpRetryException.h (original)
+++ activemq/activemq-cpp/trunk/src/main/decaf/net/HttpRetryException.h Sat Aug 23 07:07:59 2008
@@ -53,7 +53,38 @@
 
         /**
          * Constructor - Initializes the file name and line number where
-         * this message occured.  Sets the message to report, using an
+         * this message occurred.  Sets the message to report, using an
+         * optional list of arguments to parse into the message
+         * @param file name where exception occurs
+         * @param line number where the exception occurred.
+         * @param cause The exception that was the cause for this one to be thrown.
+         * @param message to report
+         * @param list of primitives that are formatted into the message
+         */
+        HttpRetryException( const char* file, const int lineNumber,
+                            const std::exception* cause,
+                            const char* msg, ... )
+        throw() : io::IOException( cause )
+        {
+            va_list vargs;
+            va_start( vargs, msg );
+            buildMessage( msg, vargs );
+
+            // Set the first mark for this exception.
+            setMark( file, lineNumber );
+        }
+
+        /**
+         * Constructor
+         * @param cause Pointer to the exception that caused this one to
+         * be thrown, the object is cloned caller retains ownership.
+         */
+        HttpRetryException( const std::exception* cause )
+            throw() : io::IOException( cause ) {}
+
+        /**
+         * Constructor - Initializes the file name and line number where
+         * this message occurred.  Sets the message to report, using an
          * optional list of arguments to parse into the message
          * @param file name where exception occurs
          * @param line number where the exception occurred.

Modified: activemq/activemq-cpp/trunk/src/main/decaf/net/MalformedURLException.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/decaf/net/MalformedURLException.h?rev=688327&r1=688326&r2=688327&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/decaf/net/MalformedURLException.h (original)
+++ activemq/activemq-cpp/trunk/src/main/decaf/net/MalformedURLException.h Sat Aug 23 07:07:59 2008
@@ -53,7 +53,38 @@
 
         /**
          * Constructor - Initializes the file name and line number where
-         * this message occured.  Sets the message to report, using an
+         * this message occurred.  Sets the message to report, using an
+         * optional list of arguments to parse into the message
+         * @param file name where exception occurs
+         * @param line number where the exception occurred.
+         * @param cause The exception that was the cause for this one to be thrown.
+         * @param message to report
+         * @param list of primitives that are formatted into the message
+         */
+        MalformedURLException( const char* file, const int lineNumber,
+                               const std::exception* cause,
+                               const char* msg, ... )
+        throw() : io::IOException( cause )
+        {
+            va_list vargs;
+            va_start( vargs, msg );
+            buildMessage( msg, vargs );
+
+            // Set the first mark for this exception.
+            setMark( file, lineNumber );
+        }
+
+        /**
+         * Constructor
+         * @param cause Pointer to the exception that caused this one to
+         * be thrown, the object is cloned caller retains ownership.
+         */
+        MalformedURLException( const std::exception* cause )
+            throw() : io::IOException( cause ) {}
+
+        /**
+         * Constructor - Initializes the file name and line number where
+         * this message occurred.  Sets the message to report, using an
          * optional list of arguments to parse into the message
          * @param file name where exception occurs
          * @param line number where the exception occurred.

Modified: activemq/activemq-cpp/trunk/src/main/decaf/net/NoRouteToHostException.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/decaf/net/NoRouteToHostException.h?rev=688327&r1=688326&r2=688327&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/decaf/net/NoRouteToHostException.h (original)
+++ activemq/activemq-cpp/trunk/src/main/decaf/net/NoRouteToHostException.h Sat Aug 23 07:07:59 2008
@@ -53,15 +53,46 @@
 
         /**
          * Constructor - Initializes the file name and line number where
-         * this message occured.  Sets the message to report, using an
+         * this message occurred.  Sets the message to report, using an
          * optional list of arguments to parse into the message
          * @param file name where exception occurs
          * @param line number where the exception occurred.
+         * @param cause The exception that was the cause for this one to be thrown.
          * @param message to report
          * @param list of primitives that are formatted into the message
          */
         NoRouteToHostException( const char* file, const int lineNumber,
-                            const char* msg, ... ) throw ()
+                               const std::exception* cause,
+                               const char* msg, ... )
+        throw() : SocketException( cause )
+        {
+            va_list vargs;
+            va_start( vargs, msg );
+            buildMessage( msg, vargs );
+
+            // Set the first mark for this exception.
+            setMark( file, lineNumber );
+        }
+
+        /**
+         * Constructor
+         * @param cause Pointer to the exception that caused this one to
+         * be thrown, the object is cloned caller retains ownership.
+         */
+        NoRouteToHostException( const std::exception* cause )
+            throw() : SocketException( cause ) {}
+
+        /**
+         * Constructor - Initializes the file name and line number where
+         * this message occurred.  Sets the message to report, using an
+         * optional list of arguments to parse into the message
+         * @param file name where exception occurs
+         * @param line number where the exception occurred.
+         * @param message to report
+         * @param list of primitives that are formatted into the message
+         */
+        NoRouteToHostException( const char* file, const int lineNumber,
+                                const char* msg, ... ) throw ()
         : SocketException()
         {
             va_list vargs ;

Modified: activemq/activemq-cpp/trunk/src/main/decaf/net/PortUnreachableException.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/decaf/net/PortUnreachableException.h?rev=688327&r1=688326&r2=688327&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/decaf/net/PortUnreachableException.h (original)
+++ activemq/activemq-cpp/trunk/src/main/decaf/net/PortUnreachableException.h Sat Aug 23 07:07:59 2008
@@ -53,7 +53,38 @@
 
         /**
          * Constructor - Initializes the file name and line number where
-         * this message occured.  Sets the message to report, using an
+         * this message occurred.  Sets the message to report, using an
+         * optional list of arguments to parse into the message
+         * @param file name where exception occurs
+         * @param line number where the exception occurred.
+         * @param cause The exception that was the cause for this one to be thrown.
+         * @param message to report
+         * @param list of primitives that are formatted into the message
+         */
+        PortUnreachableException( const char* file, const int lineNumber,
+                                  const std::exception* cause,
+                                  const char* msg, ... )
+        throw() : SocketException( cause )
+        {
+            va_list vargs;
+            va_start( vargs, msg );
+            buildMessage( msg, vargs );
+
+            // Set the first mark for this exception.
+            setMark( file, lineNumber );
+        }
+
+        /**
+         * Constructor
+         * @param cause Pointer to the exception that caused this one to
+         * be thrown, the object is cloned caller retains ownership.
+         */
+        PortUnreachableException( const std::exception* cause )
+            throw() : SocketException( cause ) {}
+
+        /**
+         * Constructor - Initializes the file name and line number where
+         * this message occurred.  Sets the message to report, using an
          * optional list of arguments to parse into the message
          * @param file name where exception occurs
          * @param line number where the exception occurred.

Modified: activemq/activemq-cpp/trunk/src/main/decaf/net/ProtocolException.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/decaf/net/ProtocolException.h?rev=688327&r1=688326&r2=688327&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/decaf/net/ProtocolException.h (original)
+++ activemq/activemq-cpp/trunk/src/main/decaf/net/ProtocolException.h Sat Aug 23 07:07:59 2008
@@ -53,6 +53,37 @@
 
         /**
          * Constructor - Initializes the file name and line number where
+         * this message occurred.  Sets the message to report, using an
+         * optional list of arguments to parse into the message
+         * @param file name where exception occurs
+         * @param line number where the exception occurred.
+         * @param cause The exception that was the cause for this one to be thrown.
+         * @param message to report
+         * @param list of primitives that are formatted into the message
+         */
+        ProtocolException( const char* file, const int lineNumber,
+                           const std::exception* cause,
+                           const char* msg, ... )
+        throw() : io::IOException( cause )
+        {
+            va_list vargs;
+            va_start( vargs, msg );
+            buildMessage( msg, vargs );
+
+            // Set the first mark for this exception.
+            setMark( file, lineNumber );
+        }
+
+        /**
+         * Constructor
+         * @param cause Pointer to the exception that caused this one to
+         * be thrown, the object is cloned caller retains ownership.
+         */
+        ProtocolException( const std::exception* cause )
+            throw() : io::IOException( cause ) {}
+
+        /**
+         * Constructor - Initializes the file name and line number where
          * this message occured.  Sets the message to report, using an
          * optional list of arguments to parse into the message
          * @param file name where exception occurs

Modified: activemq/activemq-cpp/trunk/src/main/decaf/net/SocketException.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/decaf/net/SocketException.h?rev=688327&r1=688326&r2=688327&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/decaf/net/SocketException.h (original)
+++ activemq/activemq-cpp/trunk/src/main/decaf/net/SocketException.h Sat Aug 23 07:07:59 2008
@@ -41,6 +41,38 @@
             *(lang::Exception*)this = ex;
         }
 
+        /**
+         * Constructor - Initializes the file name and line number where
+         * this message occurred.  Sets the message to report, using an
+         * optional list of arguments to parse into the message
+         * @param file name where exception occurs
+         * @param line number where the exception occurred.
+         * @param cause The exception that was the cause for this one to be thrown.
+         * @param message to report
+         * @param list of primitives that are formatted into the message
+         */
+        SocketException( const char* file, const int lineNumber,
+                         const std::exception* cause,
+                         const char* msg, ... )
+        throw() : io::IOException( cause )
+        {
+            va_list vargs;
+            va_start( vargs, msg );
+            buildMessage( msg, vargs );
+
+            // Set the first mark for this exception.
+            setMark( file, lineNumber );
+        }
+
+        /**
+         * Constructor
+         * @param cause Pointer to the exception that caused this one to
+         * be thrown, the object is cloned caller retains ownership.
+         */
+        SocketException( const std::exception* cause )
+            throw() : io::IOException( cause ) {}
+
+
         SocketException( const char* file, const int lineNumber,
                          const char* msg, ...) throw()
         : io::IOException() {
@@ -67,6 +99,4 @@
 
 }}
 
-
 #endif // _DECAF_NET_SOCKETEXCEPTION_H_
-

Modified: activemq/activemq-cpp/trunk/src/main/decaf/net/SocketTimeoutException.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/decaf/net/SocketTimeoutException.h?rev=688327&r1=688326&r2=688327&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/decaf/net/SocketTimeoutException.h (original)
+++ activemq/activemq-cpp/trunk/src/main/decaf/net/SocketTimeoutException.h Sat Aug 23 07:07:59 2008
@@ -53,15 +53,46 @@
 
         /**
          * Constructor - Initializes the file name and line number where
-         * this message occured.  Sets the message to report, using an
+         * this message occurred.  Sets the message to report, using an
          * optional list of arguments to parse into the message
          * @param file name where exception occurs
          * @param line number where the exception occurred.
+         * @param cause The exception that was the cause for this one to be thrown.
          * @param message to report
          * @param list of primitives that are formatted into the message
          */
         SocketTimeoutException( const char* file, const int lineNumber,
-                            const char* msg, ... ) throw ()
+                                const std::exception* cause,
+                                const char* msg, ... )
+        throw() : io::InterruptedIOException( cause )
+        {
+            va_list vargs;
+            va_start( vargs, msg );
+            buildMessage( msg, vargs );
+
+            // Set the first mark for this exception.
+            setMark( file, lineNumber );
+        }
+
+        /**
+         * Constructor
+         * @param cause Pointer to the exception that caused this one to
+         * be thrown, the object is cloned caller retains ownership.
+         */
+        SocketTimeoutException( const std::exception* cause )
+            throw() : io::InterruptedIOException( cause ) {}
+
+        /**
+         * Constructor - Initializes the file name and line number where
+         * this message occurred.  Sets the message to report, using an
+         * optional list of arguments to parse into the message
+         * @param file name where exception occurs
+         * @param line number where the exception occurred.
+         * @param message to report
+         * @param list of primitives that are formatted into the message
+         */
+        SocketTimeoutException( const char* file, const int lineNumber,
+                                const char* msg, ... ) throw ()
         : io::InterruptedIOException()
         {
             va_list vargs ;



Mime
View raw message