Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Essential Tools Module Reference Guide


Module:  Essential Tools Module   Group:  String Processing


Local Index



#include <rw/rwerr.h>
RWRegexErr msg("exception message");


Class RWRegexErr is an exception class used to report errors from within RWTRegex.

RWRegexErr is derived from RWInternalErr, and is therefore part of the RWxmsg class hierarchy. Classes in this hierarchy are used to report errors from within the Essential Tools Module.

RWRegexErr customizes RWInternalErr to provide not only an error message (inherited from RWxmsg), but also an error code and an error offset.

The error code is an RWTRegexStatus enumeration constant represented as a size_t, and is useful in generating error messages in the wide characters required for many non-Latin languages.

The error offset is the character offset into a pattern string at which a pattern compilation error occurred.

When RWTRegex<T> generates an error, it creates an RWRegexErr object to represent the error. A copy of this object is saved in the RWTRegex object, and is available through RWTRegex::getStatus()

Then, RWTHROW is used to report the error. If exceptions are enabled, then the RWRegexErr object is thrown as an exception. If not, a user-defined call-back function is invoked.




Program output:

Public Constructors

RWRegexErr(const char* msg, size_t eCode, size_t eOffset);
RWRegexErr(const RWMessage& msg);

Public Destructors

virtual ~RWRegexErr();

Public Member Functions

const char* why();
size_t getCode() const
size_t getOffset() const;

Previous fileTop of DocumentContentsIndex pageNext file

©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.