From c49581f85ad9c3ad0e5b7595f5c7d6e72ea9a61b Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Thu, 1 Aug 2019 12:45:31 -0700 Subject: ignore the panic result from the keyboard prompt There's not a lot we can do about it. --- src/session.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/session.rs b/src/session.rs index cd33327..a8e5dc3 100644 --- a/src/session.rs +++ b/src/session.rs @@ -311,7 +311,10 @@ impl Session { abstrakt: *mut *mut c_void, ) { use std::panic::{catch_unwind, AssertUnwindSafe}; - catch_unwind(AssertUnwindSafe(|| { + // Catch panics; we can't let them unwind to C code. + // There's not much to be done with them though because the + // signature of the callback doesn't allow reporting an error. + let _ = catch_unwind(AssertUnwindSafe(|| { let prompter = unsafe { &mut **(abstrakt as *mut *mut P) }; let username = -- cgit v1.2.3