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

Method error_extended

crates/stdlib/src/_sqlite3.rs:2851–2860  ·  view source on GitHub ↗
(self, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

2849 }
2850
2851 fn error_extended(self, vm: &VirtualMachine) -> PyBaseExceptionRef {
2852 let errcode = unsafe { sqlite3_errcode(self.db) };
2853 let typ = exception_type_from_errcode(errcode, vm);
2854 let extended_errcode = unsafe { sqlite3_extended_errcode(self.db) };
2855 let errmsg = unsafe { sqlite3_errmsg(self.db) };
2856 let errmsg = unsafe { CStr::from_ptr(errmsg) };
2857 let errmsg = errmsg.to_str().unwrap().to_owned();
2858
2859 raise_exception(typ.to_owned(), extended_errcode, errmsg, vm)
2860 }
2861
2862 fn open(path: *const libc::c_char, uri: bool, vm: &VirtualMachine) -> PyResult<Self> {
2863 let mut db = null_mut();

Callers 4

backupMethod · 0.80
executeMethod · 0.80
checkMethod · 0.80
step_row_else_doneMethod · 0.80

Calls 5

raise_exceptionFunction · 0.85
to_strMethod · 0.80
to_ownedMethod · 0.45
unwrapMethod · 0.45

Tested by

no test coverage detected