(self, vm: &VirtualMachine, exc: PyBaseExceptionRef, msg: &str)
| 3339 | } |
| 3340 | |
| 3341 | fn result_exception(self, vm: &VirtualMachine, exc: PyBaseExceptionRef, msg: &str) { |
| 3342 | if exc.fast_isinstance(vm.ctx.exceptions.memory_error) { |
| 3343 | unsafe { sqlite3_result_error_nomem(self.ctx) } |
| 3344 | } else if exc.fast_isinstance(vm.ctx.exceptions.overflow_error) { |
| 3345 | unsafe { sqlite3_result_error_toobig(self.ctx) } |
| 3346 | } else { |
| 3347 | unsafe { sqlite3_result_error(self.ctx, msg.as_ptr().cast(), -1) } |
| 3348 | } |
| 3349 | if enable_traceback().load(Ordering::Relaxed) { |
| 3350 | vm.print_exception(exc); |
| 3351 | } |
| 3352 | } |
| 3353 | |
| 3354 | fn db_handle(self) -> *mut sqlite3 { |
| 3355 | unsafe { sqlite3_context_db_handle(self.ctx) } |
no test coverage detected