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

Function xmlcharrefreplace_errors

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

Source from the content-addressed store, hash-verified

1178}
1179
1180fn xmlcharrefreplace_errors(
1181 err: PyObjectRef,
1182 vm: &VirtualMachine,
1183) -> PyResult<(PyObjectRef, usize)> {
1184 if is_encode_err(&err, vm) {
1185 call_native_encode_error(errors::XmlCharRefReplace, err, vm)
1186 } else {
1187 Err(bad_err_type(err, vm))
1188 }
1189}
1190
1191fn backslashreplace_errors(
1192 err: PyObjectRef,

Callers

nothing calls this directly

Calls 4

is_encode_errFunction · 0.85
call_native_encode_errorFunction · 0.85
bad_err_typeFunction · 0.85
ErrClass · 0.50

Tested by

no test coverage detected