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

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)
 

Static Private Member Functions

static const char * _Stringify (regex_constants::error_type _Ex)
 

Private Attributes

regex_constants::error_type _Err
 

Additional Inherited Members

- Protected Member Functions inherited from runtime_error
virtual void _Doraise () const
 

Constructor & Destructor Documentation

regex_error::regex_error ( regex_constants::error_type  _Ex)
inlineexplicit
530  : runtime_error(_Stringify(_Ex)), _Err(_Ex)
531  { // construct
532  }
runtime_error(const string &_Message)
Definition: stdexcept:171
regex_constants::error_type _Err
Definition: regex:597
static const char * _Stringify(regex_constants::error_type _Ex)
Definition: regex:540

Member Function Documentation

static const char* regex_error::_Stringify ( regex_constants::error_type  _Ex)
inlinestaticprivate
541  { // map error code to string
542  switch (_Ex)
543  { // select known error_type message
545  return ("regex_error(error_collate): The expression "
546  "contained an invalid collating element name.");
548  return ("regex_error(error_ctype): The expression "
549  "contained an invalid character class name.");
551  return ("regex_error(error_escape): The expression "
552  "contained an invalid escaped character, "
553  "or a trailing escape.");
555  return ("regex_error(error_backref): The expression "
556  "contained an invalid back reference.");
558  return ("regex_error(error_brack): The expression "
559  "contained mismatched [ and ].");
561  return ("regex_error(error_paren): The expression "
562  "contained mismatched ( and ).");
564  return ("regex_error(error_brace): The expression "
565  "contained mismatched { and }.");
567  return ("regex_error(error_badbrace): The expression "
568  "contained an invalid range in a { expression }.");
570  return ("regex_error(error_range): The expression "
571  "contained an invalid character range, "
572  "such as [b-a] in most encodings.");
574  return ("regex_error(error_space): There was insufficient "
575  "memory to convert the expression into "
576  "a finite state machine.");
578  return ("regex_error(error_badrepeat): One of *?+{ "
579  "was not preceded by a valid regular expression.");
581  return ("regex_error(error_complexity): The complexity of "
582  "an attempted match against a regular expression "
583  "exceeded a pre-set level.");
585  return ("regex_error(error_stack): There was insufficient "
586  "memory to determine whether the regular expression "
587  "could match the specified character sequence.");
589  return ("regex_error(error_parse)");
591  return ("regex_error(error_syntax)");
592  default:
593  return ("regex_error");
594  }
595  }
Definition: regex:187
Definition: regex:188
Definition: regex:178
Definition: regex:182
Definition: regex:177
Definition: regex:184
Definition: regex:183
Definition: regex:176
Definition: regex:175
Definition: regex:181
Definition: regex:179
Definition: regex:180
Definition: regex:189
regex_constants::error_type regex_error::code ( ) const
inline
535  { // return stored error code
536  return (_Err);
537  }
regex_constants::error_type _Err
Definition: regex:597

Member Data Documentation

regex_constants::error_type regex_error::_Err
private

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