activemq-cpp-3.6.0
|
#include <src/main/decaf/lang/Exception.h>
Public Member Functions | |
Exception () | |
Default Constructor. | |
Exception (const Exception &ex) | |
Copy Constructor. | |
Exception (const std::exception *cause) | |
Constructor. | |
Exception (const char *file, const int lineNumber, const char *msg,...) | |
Constructor - Initializes the file name and line number where this message occurred. | |
Exception (const char *file, const int lineNumber, const std::exception *cause, const char *msg,...) | |
Constructor - Initializes the file name and line number where this message occurred. | |
virtual | ~Exception () throw () |
virtual std::string | getMessage () const |
Gets the message for this exception. | |
virtual const std::exception * | getCause () const |
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. | |
virtual void | initCause (const std::exception *cause) |
Initializes the contained cause exception with the one given. | |
virtual const char * | what () const throw () |
Implement method from std::exception. | |
virtual void | setMessage (const char *msg,...) |
Sets the cause for this exception. | |
virtual void | setMark (const char *file, const int lineNumber) |
Adds a file/line number to the stack trace. | |
virtual Exception * | clone () const |
Clones this exception. | |
virtual std::vector< std::pair < std::string, int > > | getStackTrace () const |
Provides the stack trace for every point where this exception was caught, marked, and rethrown. | |
virtual void | printStackTrace () const |
Prints the stack trace to std::err. | |
virtual void | printStackTrace (std::ostream &stream) const |
Prints the stack trace to the given output stream. | |
virtual std::string | getStackTraceString () const |
Gets the stack trace as one contiguous string. | |
Exception & | operator= (const Exception &ex) |
Assignment operator, copies one Exception to another. | |
![]() | |
Throwable () | |
virtual | ~Throwable () throw () |
Protected Member Functions | |
virtual void | setStackTrace (const std::vector< std::pair< std::string, int > > &trace) |
virtual void | buildMessage (const char *format, va_list &vargs) |
Protected Attributes | |
ExceptionData * | data |
decaf::lang::Exception::Exception | ( | ) |
Default Constructor.
Copy Constructor.
ex | The Exception instance to copy. |
decaf::lang::Exception::Exception | ( | const std::exception * | cause | ) |
Constructor.
cause | Pointer to the exception that caused this one to be thrown, the caller must ensure that it passes a valid pointer as this object takes ownership of the exception. |
decaf::lang::Exception::Exception | ( | const char * | file, |
const int | lineNumber, | ||
const char * | msg, | ||
... | |||
) |
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.
file | The file name where exception occurs |
lineNumber | The line number where the exception occurred. |
msg | The message to report |
... | list of primitives that are formatted into the message |
decaf::lang::Exception::Exception | ( | const char * | file, |
const int | lineNumber, | ||
const std::exception * | cause, | ||
const char * | msg, | ||
... | |||
) |
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.
file | The file name where exception occurs |
lineNumber | The line number where the exception occurred. |
cause | The exception that was the cause for this one to be thrown. |
msg | The message to report |
... | list of primitives that are formatted into the message |
|
virtual |
|
protectedvirtual |
|
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.
Implements decaf::lang::Throwable.
Reimplemented in decaf::internal::net::ssl::openssl::OpenSSLSocketException, decaf::security::GeneralSecurityException, decaf::security::NoSuchProviderException, decaf::security::NoSuchAlgorithmException, decaf::security::SignatureException, decaf::security::InvalidKeyException, decaf::util::concurrent::BrokenBarrierException, decaf::security::KeyException, decaf::security::KeyManagementException, decaf::net::URISyntaxException, activemq::exceptions::ActiveMQException, decaf::security::cert::CertificateExpiredException, decaf::security::cert::CertificateNotYetValidException, decaf::security::cert::CertificateParsingException, decaf::lang::exceptions::NumberFormatException, decaf::security::cert::CertificateEncodingException, decaf::lang::exceptions::IllegalStateException, decaf::lang::exceptions::IllegalThreadStateException, decaf::lang::exceptions::InvalidStateException, decaf::lang::exceptions::NullPointerException, decaf::security::cert::CertificateException, decaf::util::concurrent::TimeoutException, decaf::lang::exceptions::ClassCastException, decaf::lang::exceptions::IllegalArgumentException, decaf::lang::exceptions::InterruptedException, decaf::lang::exceptions::NegativeArraySizeException, decaf::util::concurrent::RejectedExecutionException, decaf::util::NoSuchElementException, decaf::lang::exceptions::RuntimeException, decaf::lang::exceptions::IllegalMonitorStateException, decaf::util::concurrent::CancellationException, decaf::util::concurrent::ExecutionException, decaf::io::UTFDataFormatException, decaf::lang::exceptions::IndexOutOfBoundsException, decaf::lang::exceptions::OutOfMemoryError, decaf::util::zip::ZipException, decaf::net::BindException, decaf::net::ConnectException, decaf::nio::InvalidMarkException, decaf::lang::exceptions::UnsupportedOperationException, decaf::net::HttpRetryException, decaf::net::MalformedURLException, decaf::net::NoRouteToHostException, decaf::net::PortUnreachableException, decaf::net::ProtocolException, decaf::net::SocketTimeoutException, decaf::net::UnknownHostException, decaf::net::UnknownServiceException, decaf::io::EOFException, decaf::io::InterruptedIOException, decaf::util::ConcurrentModificationException, decaf::util::zip::DataFormatException, decaf::io::IOException, decaf::io::UnsupportedEncodingException, decaf::nio::ReadOnlyBufferException, decaf::nio::BufferUnderflowException, decaf::nio::BufferOverflowException, decaf::net::SocketException, activemq::exceptions::BrokerException, and activemq::exceptions::ConnectionFailedException.
|
virtual |
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.
Implements decaf::lang::Throwable.
|
virtual |
Gets the message for this exception.
Implements decaf::lang::Throwable.
|
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).
Implements decaf::lang::Throwable.
|
virtual |
Gets the stack trace as one contiguous string.
Implements decaf::lang::Throwable.
|
virtual |
Initializes the contained cause exception with the one given.
A copy is made to avoid ownership issues.
cause | The exception that was the cause of this one. |
Implements decaf::lang::Throwable.
|
virtual |
Prints the stack trace to std::err.
Implements decaf::lang::Throwable.
|
virtual |
Prints the stack trace to the given output stream.
stream | the target output stream. |
Implements decaf::lang::Throwable.
Adds a file/line number to the stack trace.
file | The name of the file calling this method (use FILE). |
lineNumber | The line number in the calling file (use LINE). |
Implements decaf::lang::Throwable.
Referenced by decaf::util::concurrent::ExecutorService::submit().
|
virtual |
Sets the cause for this exception.
msg | The format string for the msg. |
... | The params to format into the string. |
|
protectedvirtual |
|
virtual |
Implement method from std::exception.
getMessage()
.
|
protected |