activemq-cpp-3.3.0

src/main/decaf/lang/exceptions/ExceptionDefines.h File Reference

Go to the source code of this file.

Defines

#define DECAF_CATCH_RETHROW(type)
 Macro for catching and rethrowing an exception of a given type.
#define DECAF_CATCH_EXCEPTION_CONVERT(sourceType, targetType)
 Macro for catching an exception of one type and then rethrowing as another type.
#define DECAF_CATCHALL_THROW(type)
 A catch-all that throws a known exception.
#define DECAF_CATCHALL_NOTHROW()
 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_CATCH_NOTHROW(type)
 Macro for catching and rethrowing an exception of a given type.

Define Documentation

#define DECAF_CATCH_EXCEPTION_CONVERT (   sourceType,
  targetType 
)
Value:
catch( sourceType& ex ){ \
        targetType target( &ex ); \
        target.setMark( __FILE__, __LINE__ ); \
        throw target; \
    }

Macro for catching an exception of one type and then rethrowing as another type.

Parameters:
sourceTypethe type of the exception to be caught.
targetTypethe type of the exception to be thrown.

Referenced by decaf::util::PriorityQueue< E >::add().

#define DECAF_CATCH_NOTHROW (   type)
Value:
catch( type& ex ){ \
        ex.setMark( __FILE__, __LINE__ ); \
    }

Macro for catching and rethrowing an exception of a given type.

Parameters:
typeThe type of the exception to throw (e.g. Exception ).
#define DECAF_CATCH_RETHROW (   type)
Value:
catch( type& ex ){ \
        ex.setMark( __FILE__, __LINE__ ); \
        throw ex; \
    }

Macro for catching and rethrowing an exception of a given type.

Parameters:
typeThe type of the exception to throw (e.g. Exception ).

Referenced by decaf::util::PriorityQueue< E >::add(), and decaf::util::concurrent::LinkedBlockingQueue< E >::LinkedBlockingQueue().

#define DECAF_CATCHALL_NOTHROW ( )
Value:
catch( ... ){ \
        lang::Exception ex( __FILE__, __LINE__, \
            "caught unknown exception, not rethrowing" ); \
    }

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.

Referenced by decaf::util::ArrayList< E >::~ArrayList().

#define DECAF_CATCHALL_THROW (   type)
Value:
catch( ... ){ \
        type ex( __FILE__, __LINE__, \
            "caught unknown exception" ); \
        throw ex; \
    }

A catch-all that throws a known exception.

Parameters:
typethe type of exception to be thrown.

Referenced by decaf::util::PriorityQueue< E >::add(), and decaf::util::concurrent::LinkedBlockingQueue< E >::LinkedBlockingQueue().