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

Function surrogateescape_errors

crates/vm/src/codecs.rs:1224–1232  ·  view source on GitHub ↗
(err: PyObjectRef, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

1222}
1223
1224fn surrogateescape_errors(err: PyObjectRef, vm: &VirtualMachine) -> PyResult<(PyObjectRef, usize)> {
1225 if is_encode_err(&err, vm) {
1226 call_native_encode_error(errors::SurrogateEscape, err, vm)
1227 } else if is_decode_err(&err, vm) {
1228 call_native_decode_error(errors::SurrogateEscape, err, vm)
1229 } else {
1230 Err(bad_err_type(err, vm))
1231 }
1232}

Calls 6

is_encode_errFunction · 0.85
call_native_encode_errorFunction · 0.85
is_decode_errFunction · 0.85
call_native_decode_errorFunction · 0.85
bad_err_typeFunction · 0.85
ErrClass · 0.50