Commit Graph

4 Commits

Author SHA1 Message Date
kngwyu a82726a240 Reguire GIL before constructing PyErr from Rust value 2019-09-07 15:38:59 +09:00
Alexander Niederbühl 9d9ebfa556 Disable test for windows
The test fails for Windows, since the error message is provided by the
OS.
2019-08-03 22:36:23 +02:00
Alexander Niederbühl 618b9090ed Add test for exception with custom error
Also simplify the old test.
2019-08-03 22:08:51 +02:00
Alexander Niederbühl 1e01f4f8cc Use to_string() instead of description() for exception messages
`description()` is soft-deprecated and can differ from `to_string()`.

For example for NotFound error:
* `description()`: "entity not found"
* `to_string()`: "No such file or directory (os error 2)"

Since io errors provide their error code through the Display trait there
is no need to get it through `raw_os_error()`.
2019-08-01 00:48:56 +02:00