SourcePro C++ 12.0 |
SourcePro® C++ API Reference Guide |
SourcePro C++ Documentation Home |
Template class for creating a thread-compatible exception from an existing exception class. More...
#include <rw/threxcept/RWTTHRCompatibleException.h>
Public Member Functions | |
RWTTHRCompatibleException (const Exception &exception) | |
RWTTHRCompatibleException (const RWTTHRCompatibleException< Exception > &second) | |
~RWTTHRCompatibleException (void) | |
operator Exception (void) const | |
RWTTHRCompatibleException < Exception > & | operator= (const RWTTHRCompatibleException< Exception > &second) |
virtual RWTHRxmsg * | clone (void) const |
virtual void | raise (void) const |
RWTTHRCompatibleException<Exception> is a template class that can be used to create a thread-compatible exception from an existing exception class. A thread-compatible exception is derived from RWTHRxmsg, and possesses clone() and raise() members that allow for a copy of the exception to be stored so that it may be rethrown in the future. The ability to rethrow exceptions in the future allows exceptions to be passed across thread boundaries.
#include <rw/threxcept/RWTTHRCompatibleException.h> class MyException {}; throw RWTTHRCompatibleException<MyException>(MyException());
RWTTHRCompatibleException< Exception >::RWTTHRCompatibleException | ( | const Exception & | exception | ) |
Constructs a new instance, initializing the internal exception instance to exception.
RWTTHRCompatibleException< Exception >::RWTTHRCompatibleException | ( | const RWTTHRCompatibleException< Exception > & | second | ) |
Copy constructor. Constructs a new instance whose exception value is initialized from the exception within second.
RWTTHRCompatibleException< Exception >::~RWTTHRCompatibleException | ( | void | ) |
Destructor.
virtual RWTHRxmsg* RWTTHRCompatibleException< Exception >::clone | ( | void | ) | const [virtual] |
Makes a copy of this so it can be stored.
Reimplemented from RWTHRxmsg.
RWTTHRCompatibleException< Exception >::operator Exception | ( | void | ) | const |
Cast operator. Returns internal Exception
instance.
RWTTHRCompatibleException<Exception>& RWTTHRCompatibleException< Exception >::operator= | ( | const RWTTHRCompatibleException< Exception > & | second | ) |
Copies the internal exception within second to self.
virtual void RWTTHRCompatibleException< Exception >::raise | ( | void | ) | const [virtual] |
Throws the exception stored in this.
Reimplemented from RWTHRxmsg.
© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.