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

Function lookup_error

crates/vm/src/stdlib/_codecs.rs:108–113  ·  view source on GitHub ↗
(name: PyUtf8StrRef, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

106
107 #[pyfunction]
108 fn lookup_error(name: PyUtf8StrRef, vm: &VirtualMachine) -> PyResult {
109 if name.as_str().contains('\0') {
110 return Err(cstring_error(vm));
111 }
112 vm.state.codec_registry.lookup_error(name.as_str(), vm)
113 }
114
115 #[pyfunction]
116 fn _unregister_error(errors: PyUtf8StrRef, vm: &VirtualMachine) -> PyResult<bool> {

Callers 3

codecs.pyFile · 0.85
codecs.pyFile · 0.85

Calls 5

cstring_errorFunction · 0.85
lookup_errorMethod · 0.80
ErrClass · 0.50
containsMethod · 0.45
as_strMethod · 0.45

Tested by

no test coverage detected