Module: Essential Tools Module Group: Miscellaneous
Does not inherit
#include <rw/rwerr.h> RWxmsg x("exception message");
This class is the base class for the hierarchy of exceptions in the Essential Tools Module. (See also Section 10.3.1.1, "RWxmsg," in the User's Guide. Although we document the entire class here, your code usually should not create or directly throw RWxmsg objects. Instead, you should expect to write code that may catch an RWxmsg or one of its derived classes. Essential Tools Module classes that need to report exceptional circumstances will call RWTHROW(RWxmsg&). RWTHROW will throw the RWxmsg if exceptions are enabled. Otherwise, RWTHROW will call an appropriate current Essential Tools Module error handler function (see Section 10.3, "Error Reporting and Error Handling," in the User's Guide.
RWxmsg provides a basic interface for exceptions, from which an exception string is always available. This exception string is obtained through the why method, and is represented as a const char*, single-byte character sequence.
Creates an exception that returns msg when its method why() is called.
RWxmsg(const RWMessage& rwmsg);
Creates an exception with a message from the localizable RWMessage class instance rwmsg. (See Section 16.2 in the User's Guide).
RWxmsg(const char* msg, RWBoolean doCopy);
Creates an exception that returns msg when its method why() is called. If doCopy is true, copies msg into a new buffer on the heap; otherwise, simply keeps a pointer to the given location of msg.
const char* why() const;
Returns the message string contained in self.
©2004 Copyright Quovadx, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Quovadx, 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.