(&self, name: String, handler: PyObjectRef)
| 374 | } |
| 375 | |
| 376 | pub fn register_error(&self, name: String, handler: PyObjectRef) -> Option<PyObjectRef> { |
| 377 | self.inner.write().errors.insert(name, handler) |
| 378 | } |
| 379 | |
| 380 | pub fn unregister_error(&self, name: &str, vm: &VirtualMachine) -> PyResult<bool> { |
| 381 | const BUILTIN_ERROR_HANDLERS: &[&str] = &[ |