(
exc: &Py<PyBaseException>,
vm: &VirtualMachine,
)
| 370 | } |
| 371 | |
| 372 | fn get_exceptions_tuple( |
| 373 | exc: &Py<PyBaseException>, |
| 374 | vm: &VirtualMachine, |
| 375 | ) -> PyResult<Vec<PyObjectRef>> { |
| 376 | let obj = exc |
| 377 | .get_arg(1) |
| 378 | .ok_or_else(|| vm.new_type_error("exceptions must be a tuple"))?; |
| 379 | let tuple = obj |
| 380 | .downcast_ref::<PyTuple>() |
| 381 | .ok_or_else(|| vm.new_type_error("exceptions must be a tuple"))?; |
| 382 | Ok(tuple.to_vec()) |
| 383 | } |
| 384 | |
| 385 | enum ConditionMatcher { |
| 386 | Type(PyTypeRef), |
no test coverage detected