MCPcopy Index your code
hub / github.com/RustPython/RustPython / register_error

Method register_error

crates/vm/src/codecs.rs:376–378  ·  view source on GitHub ↗
(&self, name: String, handler: PyObjectRef)

Source from the content-addressed store, hash-verified

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] = &[

Calls 2

insertMethod · 0.45
writeMethod · 0.45