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
470  : runtime_error(_Stringify(_Ex)), _Err(_Ex)
471  { // construct
472  }
runtime_error(const string &_Message)
Definition: stdexcept:161
regex_constants::error_type _Err
Definition: regex:537
static const char * _Stringify(regex_constants::error_type _Ex)
Definition: regex:480

Member Function Documentation

static const char* regex_error::_Stringify ( regex_constants::error_type  _Ex)
inlinestaticprivate
481  { // map error code to string
482  switch (_Ex)
483  { // select known error_type message
485  return ("regex_error(error_collate): The expression "
486  "contained an invalid collating element name.");
488  return ("regex_error(error_ctype): The expression "
489  "contained an invalid character class name.");
491  return ("regex_error(error_escape): The expression "
492  "contained an invalid escaped character, "
493  "or a trailing escape.");
495  return ("regex_error(error_backref): The expression "
496  "contained an invalid back reference.");
498  return ("regex_error(error_brack): The expression "
499  "contained mismatched [ and ].");
501  return ("regex_error(error_paren): The expression "
502  "contained mismatched ( and ).");
504  return ("regex_error(error_brace): The expression "
505  "contained mismatched { and }.");
507  return ("regex_error(error_badbrace): The expression "
508  "contained an invalid range in a { expression }.");
510  return ("regex_error(error_range): The expression "
511  "contained an invalid character range, "
512  "such as [b-a] in most encodings.");
514  return ("regex_error(error_space): There was insufficient "
515  "memory to convert the expression into "
516  "a finite state machine.");
518  return ("regex_error(error_badrepeat): One of *?+{ "
519  "was not preceded by a valid regular expression.");
521  return ("regex_error(error_complexity): The complexity of "
522  "an attempted match against a regular expression "
523  "exceeded a pre-set level.");
525  return ("regex_error(error_stack): There was insufficient "
526  "memory to determine whether the regular expression "
527  "could match the specified character sequence.");
529  return ("regex_error(error_parse)");
531  return ("regex_error(error_syntax)");
532  default:
533  return ("regex_error");
534  }
535  }
Definition: regex:150
Definition: regex:151
Definition: regex:141
Definition: regex:145
Definition: regex:140
Definition: regex:147
Definition: regex:146
Definition: regex:139
Definition: regex:138
Definition: regex:144
Definition: regex:142
Definition: regex:143
Definition: regex:152
regex_constants::error_type regex_error::code ( ) const
inline
475  { // return stored error code
476  return (_Err);
477  }
regex_constants::error_type _Err
Definition: regex:537

Member Data Documentation

regex_constants::error_type regex_error::_Err
private

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