pg.match_error¶
Accessible via pg.match_error, pg.utils.match_error.
- match_error(error, errors)[source]¶
Returns True if the error matches the specification, .
- Return type:
- Parameters:
error – The error to match.
errors – A sequence of exception types or tuples of exception type and error messages (described in regular expression) as the desired exception types to match.
- Returns:
True if the error matches the specification, False otherwise.