SourcePro C++ 13.0 |
SourcePro® C++ API Reference Guide |
Product Documentation: SourcePro C++ Documentation Home |
Exception class that reports errors from within RWTRegex. More...
#include <rw/rwerr.h>
Public Member Functions | |
RWRegexErr (const char *msg, size_t eCode, size_t eOffset) | |
RWRegexErr (const RWRegexErr &msg) | |
RWRegexErr (RWRegexErr &&msg) | |
virtual | ~RWRegexErr () |
size_t | getCode () const |
size_t | getOffset () const |
RWRegexErr & | operator= (const RWRegexErr &) |
RWRegexErr & | operator= (RWRegexErr &&msg) |
void | swap (RWRegexErr &rhs) |
Additional Inherited Members | |
Protected Member Functions inherited from RWxmsg | |
RWxmsg (const char *msg, bool doCopy) | |
Related Functions inherited from RWxmsg | |
#define | RWTHROW(a) |
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 RWTRegex<T>::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.
When RWTRegex 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 a call to RWTRegex::getStatus().
Then, RWTHROW() is used to report the error. If exceptions are enabled, the function throws the RWRegexErr object as an exception. If not, then a user-defined callback function is invoked.
None
RWRegexErr::RWRegexErr | ( | const char * | msg, |
size_t | eCode, | ||
size_t | eOffset | ||
) |
Initializes the error object to contain the specified error message, msg. The error code, eCode, is stored as well as the offset, eOffset, into the pattern of the error.
RWRegexErr::RWRegexErr | ( | const RWRegexErr & | msg | ) |
Copy constructor.
RWRegexErr::RWRegexErr | ( | RWRegexErr && | msg | ) |
Move constructor. The constructed instance takes ownership of the data owned by msg.
|
virtual |
Destructor
size_t RWRegexErr::getCode | ( | ) | const |
Returns the error code for the error. The error code is an RWTRegex<T>::RWTRegexStatus enumerator represented as a size_t
.
size_t RWRegexErr::getOffset | ( | ) | const |
Returns the offset into the pattern at which the error occurred.
RWRegexErr& RWRegexErr::operator= | ( | const RWRegexErr & | ) |
Assignment operator.
RWRegexErr& RWRegexErr::operator= | ( | RWRegexErr && | msg | ) |
Move assignment. Self takes ownership of the data owned by msg.
void RWRegexErr::swap | ( | RWRegexErr & | rhs | ) |
Swaps the data owned by self with the data owned by rhs.
Copyright © 2014 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.
Provide feedback to Rogue Wave about its documentation.