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

Method lookup_error

crates/vm/src/codecs.rs:403–406  ·  view source on GitHub ↗
(&self, name: &str, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

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
409fn normalize_encoding_name(encoding: &str) -> Cow<'_, str> {

Callers 12

__init__Method · 0.80
test_longstringsMethod · 0.80
test_lookupMethod · 0.80
test_fake_error_classMethod · 0.80
resolveMethod · 0.80
validate_errorsMethod · 0.80
lookup_errorFunction · 0.80
encode_code_page_errorsFunction · 0.80
decode_code_page_errorsFunction · 0.80

Calls 2

ok_or_elseMethod · 0.80
lookup_error_optMethod · 0.80