activemq::exceptions::ActiveMQException Class Reference

#include <ActiveMQException.h>

Inheritance diagram for activemq::exceptions::ActiveMQException:

activemq::connector::ConnectorException activemq::connector::stomp::marshal::MarshalException activemq::exceptions::IllegalArgumentException activemq::exceptions::IllegalMonitorStateException activemq::exceptions::InterruptedException activemq::exceptions::InvalidStateException activemq::exceptions::NoSuchElementException activemq::exceptions::NullPointerException activemq::exceptions::RuntimeException activemq::exceptions::UnsupportedOperationException activemq::io::IOException activemq::transport::BrokerError List of all members.

Public Member Functions

 ActiveMQException (void)
 ActiveMQException (const ActiveMQException &ex)
 ActiveMQException (const char *file, const int lineNumber, const char *msg,...)
virtual ~ActiveMQException ()
virtual const char * getMessage () const
virtual void setMessage (const char *msg,...)
virtual void setMark (const char *file, const int lineNumber)
virtual ActiveMQExceptionclone () const
virtual std::vector< std::pair<
std::string, int > > 
getStackTrace () const
virtual void printStackTrace () const
virtual void printStackTrace (std::ostream &stream) const
virtual std::string getStackTraceString () const
virtual ActiveMQExceptionoperator= (const ActiveMQException &ex)

Protected Member Functions

virtual void buildMessage (const char *format, va_list &vargs)

Private Attributes

std::string message
std::vector< std::pair< std::string,
int > > 
stackTrace

Constructor & Destructor Documentation

activemq::exceptions::ActiveMQException::ActiveMQException void   )  [inline]
 

Default Constructor

activemq::exceptions::ActiveMQException::ActiveMQException const ActiveMQException ex  )  [inline]
 

Copy Constructor

activemq::exceptions::ActiveMQException::ActiveMQException const char *  file,
const int  lineNumber,
const char *  msg,
  ...
[inline]
 

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

Parameters:
file name where exception occurs
line number where the exception occurred.
message to report
list of primitives that are formatted into the message

virtual activemq::exceptions::ActiveMQException::~ActiveMQException  )  [inline, virtual]
 


Member Function Documentation

void ActiveMQException::buildMessage const char *  format,
va_list &  vargs
[protected, virtual]
 

virtual ActiveMQException* activemq::exceptions::ActiveMQException::clone void   )  const [inline, virtual]
 

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.

Returns:
Copy of this Exception object

Reimplemented in activemq::connector::ConnectorException, activemq::connector::stomp::marshal::MarshalException, activemq::connector::stomp::StompConnectorException, activemq::exceptions::IllegalArgumentException, activemq::exceptions::IllegalMonitorStateException, activemq::exceptions::InterruptedException, activemq::exceptions::InvalidStateException, activemq::exceptions::NoSuchElementException, activemq::exceptions::NullPointerException, activemq::exceptions::RuntimeException, activemq::exceptions::UnsupportedOperationException, activemq::io::IOException, activemq::network::SocketException, activemq::transport::BrokerError, and activemq::transport::CommandIOException.

virtual const char* activemq::exceptions::ActiveMQException::getMessage  )  const [inline, virtual]
 

Gets the message for this exception.

Returns:
Text formatted error message

virtual std::vector< std::pair< std::string, int> > activemq::exceptions::ActiveMQException::getStackTrace  )  const [inline, virtual]
 

Provides the stack trace for every point where this exception was caught, marked, and rethrown. The first item in the returned vector is the first point where the mark was set (e.g. where the exception was created).

Returns:
the stack trace.

virtual std::string activemq::exceptions::ActiveMQException::getStackTraceString  )  const [inline, virtual]
 

Gets the stack trace as one contiguous string.

Returns:
string with formatted stack trace data

virtual ActiveMQException& activemq::exceptions::ActiveMQException::operator= const ActiveMQException ex  )  [inline, virtual]
 

Assignment operator.

Parameters:
const reference to another ActiveMQException

virtual void activemq::exceptions::ActiveMQException::printStackTrace std::ostream &  stream  )  const [inline, virtual]
 

Prints the stack trace to the given output stream.

Parameters:
stream the target output stream.

virtual void activemq::exceptions::ActiveMQException::printStackTrace  )  const [inline, virtual]
 

Prints the stack trace to std::err

void ActiveMQException::setMark const char *  file,
const int  lineNumber
[virtual]
 

Adds a file/line number to the stack trace.

Parameters:
file The name of the file calling this method (use __FILE__).
lineNumber The line number in the calling file (use __LINE__).

virtual void activemq::exceptions::ActiveMQException::setMessage const char *  msg,
  ...
[inline, virtual]
 

Sets the cause for this exception.

Parameters:
msg the format string for the msg.
variable - params to format into the string


Member Data Documentation

std::string activemq::exceptions::ActiveMQException::message [private]
 

The cause of this exception.

std::vector< std::pair< std::string, int> > activemq::exceptions::ActiveMQException::stackTrace [private]
 

The stack trace.


The documentation for this class was generated from the following files:
Generated on Thu Aug 3 18:03:32 2006 for activemq-cpp by  doxygen 1.4.5