activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1004370 - in /activemq/activemq-cpp/trunk/activemq-cpp/src/main: Makefile.am activemq/exceptions/ConnectionFailedException.h
Date Mon, 04 Oct 2010 19:15:58 GMT
Author: tabish
Date: Mon Oct  4 19:15:57 2010
New Revision: 1004370

URL: http://svn.apache.org/viewvc?rev=1004370&view=rev
Log:
Add a new Exception for Connection Failures

Added:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/exceptions/ConnectionFailedException.h
  (with props)
Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/Makefile.am

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/Makefile.am
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/Makefile.am?rev=1004370&r1=1004369&r2=1004370&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/Makefile.am (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/Makefile.am Mon Oct  4 19:15:57 2010
@@ -504,6 +504,7 @@ h_sources = \
     activemq/core/policies/DefaultRedeliveryPolicy.h \
     activemq/exceptions/ActiveMQException.h \
     activemq/exceptions/BrokerException.h \
+    activemq/exceptions/ConnectionFailedException.h \
     activemq/exceptions/ExceptionDefines.h \
     activemq/io/LoggingInputStream.h \
     activemq/io/LoggingOutputStream.h \

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/exceptions/ConnectionFailedException.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/exceptions/ConnectionFailedException.h?rev=1004370&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/exceptions/ConnectionFailedException.h
(added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/exceptions/ConnectionFailedException.h
Mon Oct  4 19:15:57 2010
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ACTIVEMQ_EXCEPTION_CONNECTIONFAILEDEXCEPTION_H_
+#define _ACTIVEMQ_EXCEPTION_CONNECTIONFAILEDEXCEPTION_H_
+
+#include <activemq/util/Config.h>
+#include <activemq/exceptions/ActiveMQException.h>
+
+namespace activemq {
+namespace exceptions {
+
+    class AMQCPP_API ConnectionFailedException : public exceptions::ActiveMQException {
+    public:
+
+        ConnectionFailedException();
+
+        ConnectionFailedException( const exceptions::ActiveMQException& ex )
+            : exceptions::ActiveMQException() {
+            *( exceptions::ActiveMQException* )this = ex;
+        }
+
+        ConnectionFailedException( const ConnectionFailedException& ex )
+            : exceptions::ActiveMQException() {
+            *( exceptions::ActiveMQException* )this = ex;
+        }
+
+        ConnectionFailedException( const char* file, const int lineNumber,
+                                   const char* msg, ... )
+          : exceptions::ActiveMQException() {
+
+            va_list vargs;
+            va_start( vargs, msg );
+            buildMessage( msg, vargs );
+
+            // Set the first mark for this exception.
+            setMark( file, lineNumber );
+        }
+
+        virtual ConnectionFailedException* clone() const {
+            return new ConnectionFailedException( *this );
+        }
+
+        virtual ~ConnectionFailedException() throw();
+
+    };
+
+}}
+
+#endif /* _ACTIVEMQ_EXCEPTION_CONNECTIONFAILEDEXCEPTION_H_ */

Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/exceptions/ConnectionFailedException.h
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message