(
exc_type: PyTypeRef,
errno: Option<i32>,
strerror: impl ToPyObject,
vm: &VirtualMachine,
)
| 1275 | impl OSErrorBuilder { |
| 1276 | #[must_use] |
| 1277 | pub fn with_subtype( |
| 1278 | exc_type: PyTypeRef, |
| 1279 | errno: Option<i32>, |
| 1280 | strerror: impl ToPyObject, |
| 1281 | vm: &VirtualMachine, |
| 1282 | ) -> Self { |
| 1283 | let strerror = strerror.to_pyobject(vm); |
| 1284 | Self { |
| 1285 | exc_type, |
| 1286 | errno, |
| 1287 | strerror: Some(strerror), |
| 1288 | filename: None, |
| 1289 | #[cfg(windows)] |
| 1290 | winerror: None, |
| 1291 | filename2: None, |
| 1292 | } |
| 1293 | } |
| 1294 | |
| 1295 | #[must_use] |
| 1296 | pub fn with_errno(errno: i32, strerror: impl ToPyObject, vm: &VirtualMachine) -> Self { |
nothing calls this directly
no test coverage detected