Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Translate encoder error codes to strings
When decoding, we use raise_oserror() to convert codec error codes to strings. Adapt that code to be used when encoding as well. Add a new helper function that returns the exception so we can still raise `from exc`. Ideally we'd replace the other two callers of raise_oserror() with `raise _get_oserror()`, but the former is part of the public API.
- Loading branch information