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

Function catch_lzma_error

crates/stdlib/src/lzma.rs:99–110  ·  view source on GitHub ↗
(err: Error, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

97 }
98
99 fn catch_lzma_error(err: Error, vm: &VirtualMachine) -> PyBaseExceptionRef {
100 match err {
101 Error::UnsupportedCheck => new_lzma_error("Unsupported integrity check", vm),
102 Error::Mem => vm.new_memory_error(""),
103 Error::MemLimit => new_lzma_error("Memory usage limit exceeded", vm),
104 Error::Format => new_lzma_error("Input format not supported by decoder", vm),
105 Error::Options => new_lzma_error("Invalid or unsupported options", vm),
106 Error::Data => new_lzma_error("Corrupt input data", vm),
107 Error::Program => new_lzma_error("Internal error", vm),
108 Error::NoCheck => new_lzma_error("Corrupt input data", vm),
109 }
110 }
111
112 fn int_to_check(check: i32) -> Option<Check> {
113 if check == -1 {

Callers 7

parse_filter_chain_specFunction · 0.85
py_newMethod · 0.85
decompressMethod · 0.85
compress_vecMethod · 0.85
init_xzMethod · 0.85
init_aloneMethod · 0.85
init_rawMethod · 0.85

Calls 1

new_lzma_errorFunction · 0.85

Tested by

no test coverage detected