activemq-cpp-3.6.0
decaf::internal::net::ssl::openssl::OpenSSLSocketException Class Reference

Subclass of the standard SocketException that knows how to produce an error message from the OpenSSL error stack. More...

#include <src/main/decaf/internal/net/ssl/openssl/OpenSSLSocketException.h>

Inheritance diagram for decaf::internal::net::ssl::openssl::OpenSSLSocketException:

Public Member Functions

 OpenSSLSocketException ()
 Creates an new OpenSSLSocketException with default values.
 OpenSSLSocketException (const Exception &ex)
 Conversion Constructor from some other Exception.
 OpenSSLSocketException (const OpenSSLSocketException &ex)
 Copy Constructor.
 OpenSSLSocketException (const char *file, const int lineNumber, const std::exception *cause, const char *msg,...)
 Create a new OpenSSLSocketException and initializes the file name and line number where this message occurred.
 OpenSSLSocketException (const std::exception *cause)
 Creates a new OpenSSLSocketException with the passed exception set as the cause of this exception.
 OpenSSLSocketException (const char *file, const int lineNumber, const char *msg,...)
 Create a new OpenSSLSocketException and initializes the file name and line number where this message occurred.
 OpenSSLSocketException (const char *file, const int lineNumber)
 Create a new OpenSSLSocketException and initializes the file name and line number where this message occurred.
virtual OpenSSLSocketExceptionclone () const
 Clones this exception.
virtual ~OpenSSLSocketException () throw ()
- Public Member Functions inherited from decaf::net::SocketException
 SocketException ()
 SocketException (const lang::Exception &ex)
 SocketException (const SocketException &ex)
 SocketException (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.
 SocketException (const std::exception *cause)
 Constructor.
 SocketException (const char *file, const int lineNumber, const char *msg,...)
 Constructor - Initializes the file name and line number where this message occurred.
virtual ~SocketException () throw ()
- Public Member Functions inherited from decaf::io::IOException
 IOException ()
 Default Constructor.
 IOException (const lang::Exception &ex)
 Copy Constructor.
 IOException (const IOException &ex)
 Copy Constructor.
 IOException (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.
 IOException (const std::exception *cause)
 Constructor.
 IOException (const char *file, const int lineNumber, const char *msg,...)
 Constructor.
virtual ~IOException () throw ()
- Public Member Functions inherited from decaf::lang::Exception
 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 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.
Exceptionoperator= (const Exception &ex)
 Assignment operator, copies one Exception to another.
- Public Member Functions inherited from decaf::lang::Throwable
 Throwable ()
virtual ~Throwable () throw ()

Protected Member Functions

std::string getErrorString () const
 Gets and formats an error message string from the OpenSSL error stack.

Additional Inherited Members

- Protected Attributes inherited from decaf::lang::Exception
ExceptionData * data

Detailed Description

Subclass of the standard SocketException that knows how to produce an error message from the OpenSSL error stack.

Since
1.0

Constructor & Destructor Documentation

decaf::internal::net::ssl::openssl::OpenSSLSocketException::OpenSSLSocketException ( )

Creates an new OpenSSLSocketException with default values.

decaf::internal::net::ssl::openssl::OpenSSLSocketException::OpenSSLSocketException ( const Exception ex)

Conversion Constructor from some other Exception.

Parameters
exAn Exception object that should become this type of Exception.
decaf::internal::net::ssl::openssl::OpenSSLSocketException::OpenSSLSocketException ( const OpenSSLSocketException ex)

Copy Constructor.

Parameters
exThe OpenSSLSocketException whose values should be copied to this instance.
decaf::internal::net::ssl::openssl::OpenSSLSocketException::OpenSSLSocketException ( const char *  file,
const int  lineNumber,
const std::exception *  cause,
const char *  msg,
  ... 
)

Create a new OpenSSLSocketException and 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.

Parameters
fileThe file name where exception occurs
lineNumberThe line number where the exception occurred.
causeThe exception that was the cause for this one to be thrown (can be null).
msgThe error message to report.
...The list of primitives that are formatted into the message.
decaf::internal::net::ssl::openssl::OpenSSLSocketException::OpenSSLSocketException ( const std::exception *  cause)

Creates a new OpenSSLSocketException with the passed exception set as the cause of this exception.

Parameters
causePointer to the exception that caused this one to be thrown, the object is cloned caller retains ownership.
decaf::internal::net::ssl::openssl::OpenSSLSocketException::OpenSSLSocketException ( const char *  file,
const int  lineNumber,
const char *  msg,
  ... 
)

Create a new OpenSSLSocketException and 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.

Parameters
fileThe file name where exception occurs.
lineNumberThe line number where the exception occurred.
msgThe error message to report.
...The list of primitives that are formatted into the message
decaf::internal::net::ssl::openssl::OpenSSLSocketException::OpenSSLSocketException ( const char *  file,
const int  lineNumber 
)

Create a new OpenSSLSocketException and initializes the file name and line number where this message occurred.

Sets the message to report by getting the complete set of error messages from the OpenSSL error stack and concatenating them into one string.

Parameters
fileThe file name where exception occurs.
lineNumberThe line number where the exception occurred.
virtual decaf::internal::net::ssl::openssl::OpenSSLSocketException::~OpenSSLSocketException ( ) throw ()
virtual

Member Function Documentation

virtual OpenSSLSocketException* decaf::internal::net::ssl::openssl::OpenSSLSocketException::clone ( ) const
inlinevirtual

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 this method.

Returns
a new Exception instance that is a copy of this Exception object.

Reimplemented from decaf::net::SocketException.

std::string decaf::internal::net::ssl::openssl::OpenSSLSocketException::getErrorString ( ) const
protected

Gets and formats an error message string from the OpenSSL error stack.

Returns
a string containing the complete OpenSSL error string.

The documentation for this class was generated from the following file: