STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Static Private Member Functions | Private Attributes | List of all members
regex_error Class Reference
Inheritance diagram for regex_error:
runtime_error exception

Public Member Functions

 regex_error (regex_constants::error_type _Ex)
 
regex_constants::error_type code () const
 
- Public Member Functions inherited from runtime_error
 runtime_error (const string &_Message)
 
 runtime_error (const char *_Message)
 
- Public Member Functions inherited from exception
__CLR_OR_THIS_CALL exception (const char *_Message="unknown", int=1) _THROW0()
 
__CLR_OR_THIS_CALL exception (const exception &_Right) _THROW0()
 
exception &__CLR_OR_THIS_CALL operator= (const exception &_Right) _THROW0()
 
virtual __CLR_OR_THIS_CALL ~exception () _NOEXCEPT
 
virtual const char *__CLR_OR_THIS_CALL what () const _THROW0()
 
void __CLR_OR_THIS_CALL _Raise () const
 

Static Private Member Functions

static const char_Stringify (regex_constants::error_type _Ex)
 

Private Attributes

regex_constants::error_type _Err
 

Additional Inherited Members

- Static Public Member Functions inherited from exception
static _STD _Prhand _Set_raise_handler (_STD _Prhand _Pnew)
 
- Protected Member Functions inherited from runtime_error
virtual void _Doraise () const
 
- Protected Attributes inherited from exception
const char_Ptr
 

Constructor & Destructor Documentation

regex_error::regex_error ( regex_constants::error_type  _Ex)
inlineexplicit
469  : runtime_error(_Stringify(_Ex)), _Err(_Ex)
470  { // construct
471  }
runtime_error(const string &_Message)
Definition: stdexcept:162
regex_constants::error_type _Err
Definition: regex:536
static const char * _Stringify(regex_constants::error_type _Ex)
Definition: regex:479

Member Function Documentation

static const char* regex_error::_Stringify ( regex_constants::error_type  _Ex)
inlinestaticprivate
480  { // map error code to string
481  switch (_Ex)
482  { // select known error_type message
484  return ("regex_error(error_collate): The expression "
485  "contained an invalid collating element name.");
487  return ("regex_error(error_ctype): The expression "
488  "contained an invalid character class name.");
490  return ("regex_error(error_escape): The expression "
491  "contained an invalid escaped character, "
492  "or a trailing escape.");
494  return ("regex_error(error_backref): The expression "
495  "contained an invalid back reference.");
497  return ("regex_error(error_brack): The expression "
498  "contained mismatched [ and ].");
500  return ("regex_error(error_paren): The expression "
501  "contained mismatched ( and ).");
503  return ("regex_error(error_brace): The expression "
504  "contained mismatched { and }.");
506  return ("regex_error(error_badbrace): The expression "
507  "contained an invalid range in a { expression }.");
509  return ("regex_error(error_range): The expression "
510  "contained an invalid character range, "
511  "such as [b-a] in most encodings.");
513  return ("regex_error(error_space): There was insufficient "
514  "memory to convert the expression into "
515  "a finite state machine.");
517  return ("regex_error(error_badrepeat): One of *?+{ "
518  "was not preceded by a valid regular expression.");
520  return ("regex_error(error_complexity): The complexity of "
521  "an attempted match against a regular expression "
522  "exceeded a pre-set level.");
524  return ("regex_error(error_stack): There was insufficient "
525  "memory to determine whether the regular expression "
526  "could match the specified character sequence.");
528  return ("regex_error(error_parse)");
530  return ("regex_error(error_syntax)");
531  default:
532  return ("regex_error");
533  }
534  }
Definition: regex:149
Definition: regex:150
Definition: regex:140
Definition: regex:144
Definition: regex:139
Definition: regex:146
Definition: regex:145
Definition: regex:138
Definition: regex:137
Definition: regex:143
Definition: regex:141
Definition: regex:142
Definition: regex:151
regex_constants::error_type regex_error::code ( ) const
inline
474  { // return stored error code
475  return (_Err);
476  }
regex_constants::error_type _Err
Definition: regex:536

Member Data Documentation

regex_constants::error_type regex_error::_Err
private

The documentation for this class was generated from the following file: