30 Regular expressions library [re]

30.6 Class regex_­error [re.badexp]

class regex_error : public runtime_error {
  explicit regex_error(regex_constants::error_type ecode);
  regex_constants::error_type code() const;
The class regex_­error defines the type of objects thrown as exceptions to report errors from the regular expression library.
regex_error(regex_constants::error_type ecode);
Effects: Constructs an object of class regex_­error.
Ensures: ecode == code().
regex_constants::error_type code() const;
Returns: The error code that was passed to the constructor.