std::regex_error - cppreference.com (original) (raw)

| | | | | ------------------- | | ------------- | | class regex_error; | | (since C++11) |

Defines the type of exception object thrown to report errors in the regular expressions library.

std-regex error-inheritance.svg

Inheritance diagram

Contents

[edit] Member functions

Inherited from std::exception

Member functions

| | destroys the exception object (virtual public member function of std::exception) [edit] | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | returns an explanatory string (virtual public member function of std::exception) [edit] |

[edit] Example

Possible output:

regex_error caught: The expression contained mismatched [ and ]. The code was error_brack