You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2007/05/01 17:07:15 UTC
svn commit: r534111 -
/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/
Author: tabish
Date: Tue May 1 08:07:14 2007
New Revision: 534111
URL: http://svn.apache.org/viewvc?view=rev&rev=534111
Log:
http://issues.apache.org/activemq/browse/AMQCPP-103
Building Decaf lib
Added:
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/ExceptionDefines.h
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/IllegalArgumentException.h
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/IllegalMonitorStateException.h
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/IllegalStateException.h
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/IndexOutOfBoundsException.h
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/InterruptedException.h
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/InvalidStateException.h
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/NoSuchElementException.h
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/NullPointerException.h
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/RuntimeException.h
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/UnsupportedOperationException.h
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/ExceptionDefines.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/ExceptionDefines.h?view=auto&rev=534111
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/ExceptionDefines.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/ExceptionDefines.h Tue May 1 08:07:14 2007
@@ -0,0 +1,79 @@
+/*
+ * 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 _DECAF_LANG_EXCEPTIONS_EXCEPTIONDEFINES_H_
+#define _DECAF_LANG_EXCEPTIONS_EXCEPTIONDEFINES_H_
+
+/**
+ * Macro for catching and rethrowing an exception of
+ * a given type.
+ * @param type The type of the exception to throw
+ * (e.g. ActiveMQException ).
+ */
+#define DECAF_CATCH_RETHROW( type ) \
+ catch( type& ex ){ \
+ ex.setMark( __FILE__, __LINE__ ); \
+ throw ex; \
+ }
+
+/**
+ * Macro for catching an exception of one type and then rethrowing
+ * as another type.
+ * @param sourceType the type of the exception to be caught.
+ * @param targetType the type of the exception to be thrown.
+ */
+#define DECAF_CATCH_EXCEPTION_CONVERT( sourceType, targetType ) \
+ catch( sourceType& ex ){ \
+ targetType target( ex ); \
+ target.setMark( __FILE__, __LINE__ ); \
+ throw target; \
+ }
+
+/**
+ * A catch-all that throws a known exception.
+ * @param type the type of exception to be thrown.
+ */
+#define DECAF_CATCHALL_THROW( type ) \
+ catch( ... ){ \
+ type ex( __FILE__, __LINE__, \
+ "caught unknown exception" ); \
+ throw ex; \
+ }
+
+/**
+ * A catch-all that does not throw an exception, one use would
+ * be to catch any exception in a destructor and mark it, but not
+ * throw so that cleanup would continue as normal.
+ */
+#define DECAF_CATCHALL_NOTHROW( ) \
+ catch( ... ){ \
+ exceptions::ActiveMQException ex( __FILE__, __LINE__, \
+ "caught unknown exception, not rethrowing" ); \
+ }
+
+/**
+ * Macro for catching and rethrowing an exception of
+ * a given type.
+ * @param type The type of the exception to throw
+ * (e.g. ActiveMQException ).
+ */
+#define DECAF_CATCH_NOTHROW( type ) \
+ catch( type& ex ){ \
+ ex.setMark( __FILE__, __LINE__ ); \
+ }
+
+#endif /*_DECAF_LANG_EXCEPTIONS_EXCEPTIONDEFINES_H_*/
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/IllegalArgumentException.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/IllegalArgumentException.h?view=auto&rev=534111
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/IllegalArgumentException.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/IllegalArgumentException.h Tue May 1 08:07:14 2007
@@ -0,0 +1,96 @@
+/*
+ * 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 _DECAF_LANG_EXCEPTIONS_ILLEGALARGUMENTEXCEPTION_H_
+#define _DECAF_LANG_EXCEPTIONS_ILLEGALARGUMENTEXCEPTION_H_
+
+#include <activemq/exceptions/ActiveMQException.h>
+
+namespace decaf{
+namespace lang{
+namespace exceptions{
+
+ /*
+ * Thrown when an illegal argument was passed into a method.
+ */
+ class IllegalArgumentException : public ActiveMQException
+ {
+ public:
+
+ /**
+ * Default Constructor
+ */
+ IllegalArgumentException() throw() {}
+
+ /**
+ * Conversion Constructor from some other ActiveMQException
+ * @param An exception that should become this type of Exception
+ */
+ IllegalArgumentException( const ActiveMQException& ex ) throw()
+ : ActiveMQException()
+ {
+ *(ActiveMQException*)this = ex;
+ }
+
+ /**
+ * Copy Constructor
+ */
+ IllegalArgumentException( const IllegalArgumentException& ex ) throw()
+ : ActiveMQException()
+ {
+ *(ActiveMQException*)this = ex;
+ }
+
+ /**
+ * 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
+ * @param line number where the exception occurred.
+ * @param message to report
+ * @param list of primitives that are formatted into the message
+ */
+ IllegalArgumentException(const char* file, const int lineNumber,
+ const char* msg, ...) throw()
+ : ActiveMQException()
+ {
+ va_list vargs ;
+ va_start(vargs, msg) ;
+ buildMessage(msg, vargs) ;
+
+ // Set the first mark for this exception.
+ setMark( file, lineNumber );
+ }
+
+ /**
+ * 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.
+ */
+ virtual ActiveMQException* clone() const{
+ return new IllegalArgumentException( *this );
+ }
+
+ /**
+ * Destructor
+ */
+ virtual ~IllegalArgumentException() throw() {}
+
+ };
+
+}}}
+
+#endif /*_DECAF_LANG_EXCEPTIONS_ILLEGALARGUMENTEXCEPTION_H_*/
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/IllegalMonitorStateException.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/IllegalMonitorStateException.h?view=auto&rev=534111
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/IllegalMonitorStateException.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/IllegalMonitorStateException.h Tue May 1 08:07:14 2007
@@ -0,0 +1,93 @@
+/*
+ * 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_EXCEPTIONS_ILLEGALMONITORSTATEEXCEPTION_H_
+#define ACTIVEMQ_EXCEPTIONS_ILLEGALMONITORSTATEEXCEPTION_H_
+
+#include <activemq/exceptions/ActiveMQException.h>
+
+namespace activemq{
+namespace exceptions{
+
+ /*
+ * Thrown when an error occurs from calling a method from syncronizable
+ * and the caller doesn't hold a lock on the object.
+ */
+ class IllegalMonitorStateException : public ActiveMQException
+ {
+ public:
+
+ /**
+ * Default Constructor
+ */
+ IllegalMonitorStateException() throw() {};
+
+ /**
+ * Conversion Constructor from some other ActiveMQException
+ * @param An exception that should become this type of Exception
+ */
+ IllegalMonitorStateException(const ActiveMQException& ex) throw()
+ : ActiveMQException()
+ {
+ *(ActiveMQException*)this = ex;
+ }
+
+ /**
+ * Copy Constructor
+ */
+ IllegalMonitorStateException(const IllegalMonitorStateException& ex) throw()
+ : ActiveMQException()
+ {
+ *(ActiveMQException*)this = ex;
+ }
+
+ /**
+ * 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
+ * @param line number where the exception occurred.
+ * @param message to report
+ * @param list of primitives that are formatted into the message
+ */
+ IllegalMonitorStateException( const char* file,
+ const int lineNumber,
+ const char* msg, ...) throw()
+ {
+ va_list vargs;
+ va_start(vargs, msg);
+ buildMessage(msg, vargs);
+
+ // Set the first mark for this exception.
+ setMark(file, lineNumber);
+ }
+
+ /**
+ * 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.
+ */
+ virtual ActiveMQException* clone() const{
+ return new IllegalMonitorStateException(*this);
+ }
+
+ virtual ~IllegalMonitorStateException() throw() {}
+
+ };
+
+}}
+
+#endif /*ACTIVEMQ_EXCEPTIONS_ILLEGALMONITORSTATEEXCEPTION_H_*/
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/IllegalStateException.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/IllegalStateException.h?view=auto&rev=534111
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/IllegalStateException.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/IllegalStateException.h Tue May 1 08:07:14 2007
@@ -0,0 +1,94 @@
+/*
+ * 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_EXCEPTIONS_ILLEGALSTATEEXCEPTION_H_
+#define ACTIVEMQ_EXCEPTIONS_ILLEGALSTATEEXCEPTION_H_
+
+#include <activemq/exceptions/ActiveMQException.h>
+
+namespace activemq{
+namespace exceptions{
+
+ /*
+ * Thrown when an error occurs from calling a method from syncronizable
+ * and the caller doesn't hold a lock on the object.
+ */
+ class IllegalStateException : public ActiveMQException
+ {
+ public:
+
+ /**
+ * Default Constructor
+ */
+ IllegalStateException() throw() {};
+
+ /**
+ * Conversion Constructor from some other ActiveMQException
+ * @param An exception that should become this type of Exception
+ */
+ IllegalStateException(const ActiveMQException& ex) throw()
+ : ActiveMQException()
+ {
+ *(ActiveMQException*)this = ex;
+ }
+
+ /**
+ * Copy Constructor
+ */
+ IllegalStateException(const IllegalStateException& ex) throw()
+ : ActiveMQException()
+ {
+ *(ActiveMQException*)this = ex;
+ }
+
+ /**
+ * 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
+ * @param line number where the exception occurred.
+ * @param message to report
+ * @param list of primitives that are formatted into the message
+ */
+ IllegalStateException( const char* file,
+ const int lineNumber,
+ const char* msg, ...) throw()
+ : ActiveMQException()
+ {
+ va_list vargs;
+ va_start(vargs, msg);
+ buildMessage(msg, vargs);
+
+ // Set the first mark for this exception.
+ setMark(file, lineNumber);
+ }
+
+ /**
+ * 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.
+ */
+ virtual ActiveMQException* clone() const{
+ return new IllegalStateException(*this);
+ }
+
+ virtual ~IllegalStateException() throw() {}
+
+ };
+
+}}
+
+#endif /*ACTIVEMQ_EXCEPTIONS_ILLEGALSTATEEXCEPTION_H_*/
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/IndexOutOfBoundsException.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/IndexOutOfBoundsException.h?view=auto&rev=534111
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/IndexOutOfBoundsException.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/IndexOutOfBoundsException.h Tue May 1 08:07:14 2007
@@ -0,0 +1,95 @@
+/*
+ * 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_EXCEPTIONS_INDEXOUTOFBOUNDSEXCEPTION_H_
+#define ACTIVEMQ_EXCEPTIONS_INDEXOUTOFBOUNDSEXCEPTION_H_
+
+#include <activemq/exceptions/ActiveMQException.h>
+
+namespace activemq{
+namespace exceptions{
+
+ /*
+ * Thrown when an illegal argument was passed into a method.
+ */
+ class IndexOutOfBoundsException : public ActiveMQException
+ {
+ public:
+
+ /**
+ * Default Constructor
+ */
+ IndexOutOfBoundsException() throw() {};
+
+ /**
+ * Conversion Constructor from some other ActiveMQException
+ * @param An exception that should become this type of Exception
+ */
+ IndexOutOfBoundsException( const ActiveMQException& ex ) throw()
+ : ActiveMQException()
+ {
+ *(ActiveMQException*)this = ex;
+ }
+
+ /**
+ * Copy Constructor
+ */
+ IndexOutOfBoundsException( const IndexOutOfBoundsException& ex ) throw()
+ : ActiveMQException()
+ {
+ *(ActiveMQException*)this = ex;
+ }
+
+ /**
+ * 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
+ * @param line number where the exception occurred.
+ * @param message to report
+ * @param list of primitives that are formatted into the message
+ */
+ IndexOutOfBoundsException(const char* file, const int lineNumber,
+ const char* msg, ...) throw()
+ : ActiveMQException()
+ {
+ va_list vargs ;
+ va_start(vargs, msg) ;
+ buildMessage(msg, vargs) ;
+
+ // Set the first mark for this exception.
+ setMark( file, lineNumber );
+ }
+
+ /**
+ * 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.
+ */
+ virtual ActiveMQException* clone() const{
+ return new IndexOutOfBoundsException( *this );
+ }
+
+ /**
+ * Destructor
+ */
+ virtual ~IndexOutOfBoundsException() throw() {}
+
+ };
+
+}}
+
+#endif /*ACTIVEMQ_EXCEPTIONS_INDEXOUTOFBOUNDSEXCEPTION_H_*/
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/InterruptedException.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/InterruptedException.h?view=auto&rev=534111
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/InterruptedException.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/InterruptedException.h Tue May 1 08:07:14 2007
@@ -0,0 +1,93 @@
+/*
+ * 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_EXCEPTIONS_INTERRUPTEDENTEXCEPTION_H_
+#define ACTIVEMQ_EXCEPTIONS_INTERRUPTEDENTEXCEPTION_H_
+
+#include <activemq/exceptions/ActiveMQException.h>
+
+namespace activemq{
+namespace exceptions{
+
+ /*
+ * Thrown when an Thread is interrupted during a wait.
+ */
+ class InterruptedException : public ActiveMQException
+ {
+ public:
+
+ /**
+ * Default Constructor
+ */
+ InterruptedException() throw() {};
+
+ /**
+ * Conversion Constructor from some other ActiveMQException
+ * @param An exception that should become this type of Exception
+ */
+ InterruptedException(const ActiveMQException& ex) throw()
+ : ActiveMQException()
+ {
+ *(ActiveMQException*)this = ex;
+ }
+
+ /**
+ * Copy Constructor
+ */
+ InterruptedException(const InterruptedException& ex) throw()
+ : ActiveMQException()
+ {
+ *(ActiveMQException*)this = ex;
+ }
+
+ /**
+ * 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
+ * @param line number where the exception occurred.
+ * @param message to report
+ * @param list of primitives that are formatted into the message
+ */
+ InterruptedException( const char* file,
+ const int lineNumber,
+ const char* msg, ... ) throw()
+ : ActiveMQException()
+ {
+ va_list vargs;
+ va_start(vargs, msg);
+ buildMessage(msg, vargs);
+
+ // Set the first mark for this exception.
+ setMark(file, lineNumber);
+ }
+
+ /**
+ * 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.
+ */
+ virtual ActiveMQException* clone() const{
+ return new InterruptedException(*this);
+ }
+
+ virtual ~InterruptedException() throw() {}
+
+ };
+
+}}
+
+#endif /*ACTIVEMQ_EXCEPTIONS_INTERRUPTEDENTEXCEPTION_H_*/
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/InvalidStateException.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/InvalidStateException.h?view=auto&rev=534111
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/InvalidStateException.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/InvalidStateException.h Tue May 1 08:07:14 2007
@@ -0,0 +1,94 @@
+/*
+ * 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_EXCEPTIONS_INVALIDSTATEEXCEPTION_H_
+#define _ACTIVEMQ_EXCEPTIONS_INVALIDSTATEEXCEPTION_H_
+
+#include <activemq/exceptions/ActiveMQException.h>
+
+namespace activemq{
+namespace exceptions{
+
+ /*
+ * Thrown when an operation is requested, but the state of the object
+ * servicing the request is not correct for that request.
+ */
+ class InvalidStateException : public ActiveMQException
+ {
+ public:
+
+ /**
+ * Default Constructor
+ */
+ InvalidStateException() throw() {}
+
+ /**
+ * Conversion Constructor from some other ActiveMQException
+ * @param An exception that should become this type of Exception
+ */
+ InvalidStateException(const ActiveMQException& ex) throw()
+ : ActiveMQException()
+ {
+ *(ActiveMQException*)this = ex;
+ }
+
+ /**
+ * Copy Constructor
+ */
+ InvalidStateException( const InvalidStateException& ex ) throw()
+ : ActiveMQException()
+ {
+ *(ActiveMQException*)this = ex;
+ }
+
+ /**
+ * 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
+ * @param line number where the exception occurred.
+ * @param message to report
+ * @param list of primitives that are formatted into the message
+ */
+ InvalidStateException( const char* file,
+ const int lineNumber,
+ const char* msg, ... ) throw()
+ : ActiveMQException()
+ {
+ va_list vargs;
+ va_start( vargs, msg );
+ buildMessage( msg, vargs );
+
+ // Set the first mark for this exception.
+ setMark( file, lineNumber );
+ }
+
+ /**
+ * 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.
+ */
+ virtual ActiveMQException* clone() const{
+ return new InvalidStateException(*this);
+ }
+
+ virtual ~InvalidStateException() throw() {}
+
+ };
+
+}}
+
+#endif /*_ACTIVEMQ_EXCEPTIONS_INVALIDSTATEEXCEPTION_H_*/
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/NoSuchElementException.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/NoSuchElementException.h?view=auto&rev=534111
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/NoSuchElementException.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/NoSuchElementException.h Tue May 1 08:07:14 2007
@@ -0,0 +1,94 @@
+/*
+ * 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_EXCEPTIONS_NOSUCHELEMENTEXCEPTION_H_
+#define ACTIVEMQ_EXCEPTIONS_NOSUCHELEMENTEXCEPTION_H_
+
+#include <activemq/exceptions/ActiveMQException.h>
+
+namespace activemq{
+namespace exceptions{
+
+ /*
+ * Thrown from an operation that attempts to access some element that does
+ * not exist.
+ */
+ class NoSuchElementException : public ActiveMQException
+ {
+ public:
+
+ /**
+ * Default Constructor
+ */
+ NoSuchElementException() throw() {};
+
+ /**
+ * Conversion Constructor from some other ActiveMQException
+ * @param An exception that should become this type of Exception
+ */
+ NoSuchElementException( const ActiveMQException& ex ) throw()
+ : ActiveMQException()
+ {
+ *(ActiveMQException*)this = ex;
+ }
+
+ /**
+ * Copy Constructor
+ */
+ NoSuchElementException( const NoSuchElementException& ex ) throw()
+ : ActiveMQException()
+ {
+ *(ActiveMQException*)this = ex;
+ }
+
+ /**
+ * 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
+ * @param line number where the exception occurred.
+ * @param message to report
+ * @param list of primitives that are formatted into the message
+ */
+ NoSuchElementException( const char* file,
+ const int lineNumber,
+ const char* msg, ... ) throw()
+ : ActiveMQException()
+ {
+ va_list vargs;
+ va_start( vargs, msg );
+ buildMessage( msg, vargs );
+
+ // Set the first mark for this exception.
+ setMark( file, lineNumber );
+ }
+
+ /**
+ * 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.
+ */
+ virtual ActiveMQException* clone() const{
+ return new NoSuchElementException(*this);
+ }
+
+ virtual ~NoSuchElementException() throw() {}
+
+ };
+
+}}
+
+#endif /*ACTIVEMQ_EXCEPTIONS_NOSUCHELEMENTEXCEPTION_H_*/
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/NullPointerException.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/NullPointerException.h?view=auto&rev=534111
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/NullPointerException.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/NullPointerException.h Tue May 1 08:07:14 2007
@@ -0,0 +1,93 @@
+/*
+ * 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_EXCEPTIONS_NULLPOINTERENTEXCEPTION_H_
+#define ACTIVEMQ_EXCEPTIONS_NULLPOINTERENTEXCEPTION_H_
+
+#include <activemq/exceptions/ActiveMQException.h>
+
+namespace activemq{
+namespace exceptions{
+
+ /*
+ * Thrown when an error occurs that involves a pointer being NULL
+ */
+ class NullPointerException : public ActiveMQException
+ {
+ public:
+
+ /**
+ * Default Constructor
+ */
+ NullPointerException() throw() {};
+
+ /**
+ * Conversion Constructor from some other ActiveMQException
+ * @param An exception that should become this type of Exception
+ */
+ NullPointerException( const ActiveMQException& ex ) throw()
+ : ActiveMQException()
+ {
+ *(ActiveMQException*)this = ex;
+ }
+
+ /**
+ * Copy Constructor
+ */
+ NullPointerException(const NullPointerException& ex) throw()
+ : ActiveMQException()
+ {
+ *(ActiveMQException*)this = ex;
+ }
+
+ /**
+ * 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
+ * @param line number where the exception occurred.
+ * @param message to report
+ * @param list of primitives that are formatted into the message
+ */
+ NullPointerException( const char* file,
+ const int lineNumber,
+ const char* msg, ... ) throw()
+ : ActiveMQException()
+ {
+ va_list vargs;
+ va_start( vargs, msg );
+ buildMessage( msg, vargs );
+
+ // Set the first mark for this exception.
+ setMark( file, lineNumber );
+ }
+
+ /**
+ * 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.
+ */
+ virtual ActiveMQException* clone() const{
+ return new NullPointerException( *this );
+ }
+
+ virtual ~NullPointerException() throw() {}
+
+ };
+
+}}
+
+#endif /*ACTIVEMQ_EXCEPTIONS_NULLPOINTERENTEXCEPTION_H_*/
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/RuntimeException.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/RuntimeException.h?view=auto&rev=534111
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/RuntimeException.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/RuntimeException.h Tue May 1 08:07:14 2007
@@ -0,0 +1,95 @@
+/*
+ * 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_EXCEPTIONS_RUNTIMEENTEXCEPTION_H_
+#define ACTIVEMQ_EXCEPTIONS_RUNTIMEENTEXCEPTION_H_
+
+#include <activemq/exceptions/ActiveMQException.h>
+
+namespace activemq{
+namespace exceptions{
+
+ /*
+ * Thrown when an error occurs that involves something in the run time
+ * This could be a memory allocation exception or some other generally
+ * unrecoverable exception.
+ */
+ class RuntimeException : public ActiveMQException
+ {
+ public:
+
+ /**
+ * Default Constructor
+ */
+ RuntimeException() throw() {};
+
+ /**
+ * Conversion Constructor from some other ActiveMQException
+ * @param An exception that should become this type of Exception
+ */
+ RuntimeException( const ActiveMQException& ex ) throw()
+ : ActiveMQException()
+ {
+ *(ActiveMQException*)this = ex;
+ }
+
+ /**
+ * Copy Constructor
+ */
+ RuntimeException( const RuntimeException& ex ) throw()
+ : ActiveMQException()
+ {
+ *(ActiveMQException*)this = ex;
+ }
+
+ /**
+ * 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
+ * @param line number where the exception occurred.
+ * @param message to report
+ * @param list of primitives that are formatted into the message
+ */
+ RuntimeException( const char* file,
+ const int lineNumber,
+ const char* msg, ... ) throw()
+ : ActiveMQException()
+ {
+ va_list vargs;
+ va_start(vargs, msg);
+ buildMessage(msg, vargs);
+
+ // Set the first mark for this exception.
+ setMark(file, lineNumber);
+ }
+
+ /**
+ * 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.
+ */
+ virtual ActiveMQException* clone() const{
+ return new RuntimeException( *this );
+ }
+
+ virtual ~RuntimeException() throw() {}
+
+ };
+
+}}
+
+#endif /*ACTIVEMQ_EXCEPTIONS_RUNTIMEENTEXCEPTION_H_*/
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/UnsupportedOperationException.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/UnsupportedOperationException.h?view=auto&rev=534111
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/UnsupportedOperationException.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/exceptions/UnsupportedOperationException.h Tue May 1 08:07:14 2007
@@ -0,0 +1,93 @@
+/*
+ * 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_EXCEPTIONS_UNSUPPORTEDOPERATIONEXCEPTION_H_
+#define ACTIVEMQ_EXCEPTIONS_UNSUPPORTEDOPERATIONEXCEPTION_H_
+
+#include <activemq/exceptions/ActiveMQException.h>
+
+namespace activemq{
+namespace exceptions{
+
+ /*
+ * Thrown when an unsupported method is called.
+ */
+ class UnsupportedOperationException : public ActiveMQException
+ {
+ public:
+
+ /**
+ * Default Constructor
+ */
+ UnsupportedOperationException() throw() {};
+
+ /**
+ * Conversion Constructor from some other ActiveMQException
+ * @param An exception that should become this type of Exception
+ */
+ UnsupportedOperationException( const ActiveMQException& ex ) throw()
+ : ActiveMQException()
+ {
+ *(ActiveMQException*)this = ex;
+ }
+
+ /**
+ * Copy Constructor
+ */
+ UnsupportedOperationException( const UnsupportedOperationException& ex ) throw()
+ : ActiveMQException()
+ {
+ *(ActiveMQException*)this = ex;
+ }
+
+ /**
+ * 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
+ * @param line number where the exception occurred.
+ * @param message to report
+ * @param list of primitives that are formatted into the message
+ */
+ UnsupportedOperationException( const char* file,
+ const int lineNumber,
+ const char* msg, ... ) throw()
+ : ActiveMQException()
+ {
+ va_list vargs;
+ va_start( vargs, msg );
+ buildMessage( msg, vargs );
+
+ // Set the first mark for this exception.
+ setMark( file, lineNumber );
+ }
+
+ /**
+ * 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.
+ */
+ virtual ActiveMQException* clone() const{
+ return new UnsupportedOperationException( *this );
+ }
+
+ virtual ~UnsupportedOperationException() throw() {}
+
+ };
+
+}}
+
+#endif /*ACTIVEMQ_EXCEPTIONS_UNSUPPORTEDOPERATIONEXCEPTION_H_*/