Skip to content

Commit

Permalink
ffiutil: Format full errors from anyhow
Browse files Browse the repository at this point in the history
We need to use this alternative formatter to get full errors
including the full context chain.  IMO the anyhow default is broken.
  • Loading branch information
cgwalters authored and openshift-merge-robot committed Jun 17, 2020
1 parent 8e63215 commit 0207d17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rust/src/ffiutil.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ pub(crate) fn error_to_glib<E: Display>(e: &E, gerror: *mut *mut glib_sys::GErro
}
unsafe {
assert!((*gerror).is_null());
let c_msg = CString::new(e.to_string()).unwrap();
let c_msg = CString::new(format!("{:#}", e)).unwrap();
*gerror = glib_sys::g_error_new_literal(
gio_sys::g_io_error_quark(),
gio_sys::G_IO_ERROR_FAILED,
Expand Down

0 comments on commit 0207d17

Please sign in to comment.