Creating Your Own Exception Classes
Any special-purpose exception classes you derive from RWTHRxmsg will be thread-compatible. You must redefine the clone() and raise() members in your exception classes. For your convenience, Threads Module provides the following macros that expand into the clone() and raise() code.
RW_THR_DECLARE_EXCEPTION(yourClassName)
Declares the clone() and raise() member functions. This macro must be placed inside your class declaration.
RW_THR_IMPLEMENT_EXCEPTION(yourClassName)
Provides the definitions for the clone() and raise() member functions declared by the matching DECLARE macro (above). This macro must be placed in the implementation (.cpp) file for your class.
RW_THR_IMPLEMENT_TRACEABLE_EXCEPTION(yourClassName)
Used instead of the RW_THR_IMPLEMENT_EXCEPTION macro where entry/exit tracing is desired for the clone() and raise() member functions. (See Chapter 6, The Execution Tracing Package.)
RW_THR_DECLARE_INLINE_EXCEPTION(yourClassName)
Used instead of the RW_THR_DECLARE_EXCEPTION macro to provide inline definitions for the clone() and raise() member functions. This macro must be placed inside your class declaration. You use this macro alone for inline definitions; you do not need either of the IMPLEMENT macros listed above. If you want your functions to have entry/exit tracing, you cannot define them inline.