(&self, name: &str, vm: &VirtualMachine)
| 401 | } |
| 402 | |
| 403 | pub fn lookup_error(&self, name: &str, vm: &VirtualMachine) -> PyResult<PyObjectRef> { |
| 404 | self.lookup_error_opt(name) |
| 405 | .ok_or_else(|| vm.new_lookup_error(format!("unknown error handler name '{name}'"))) |
| 406 | } |
| 407 | } |
| 408 | |
| 409 | fn normalize_encoding_name(encoding: &str) -> Cow<'_, str> { |