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

Method new_downcast_runtime_error

crates/vm/src/vm/vm_new.rs:744–755  ·  view source on GitHub ↗
(
        &self,
        class: &Py<PyType>,
        obj: &impl AsObject,
    )

Source from the content-addressed store, hash-verified

742 }
743
744 pub(crate) fn new_downcast_runtime_error(
745 &self,
746 class: &Py<PyType>,
747 obj: &impl AsObject,
748 ) -> PyBaseExceptionRef {
749 self.new_downcast_error(
750 "payload",
751 self.ctx.exceptions.runtime_error,
752 class,
753 obj.as_object(),
754 )
755 }
756
757 pub(crate) fn new_downcast_type_error(
758 &self,

Callers 4

checkMethod · 0.80
try_value_withMethod · 0.80
try_from_objectMethod · 0.80

Calls 2

new_downcast_errorMethod · 0.80
as_objectMethod · 0.45

Tested by

no test coverage detected