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

Method to_pyexception

crates/vm/src/compiler.rs:46–48  ·  view source on GitHub ↗
(&self, vm: &crate::VirtualMachine)

Source from the content-addressed store, hash-verified

44#[cfg(any(feature = "parser", feature = "codegen"))]
45impl crate::convert::ToPyException for (CompileError, Option<&str>) {
46 fn to_pyexception(&self, vm: &crate::VirtualMachine) -> crate::builtins::PyBaseExceptionRef {
47 vm.new_syntax_error(&self.0, self.1)
48 }
49}
50
51#[cfg(any(feature = "parser", feature = "codegen"))]

Callers

nothing calls this directly

Calls 2

new_syntax_errorMethod · 0.80

Tested by

no test coverage detected