Set FFI error message to formatted error string

This commit is contained in:
Jackson Coxson
2025-10-22 10:27:13 -06:00
parent 0ccec70ed8
commit 18b8b7295c

View File

@@ -35,7 +35,7 @@ macro_rules! ffi_err {
let err: IdeviceError = $err.into(); let err: IdeviceError = $err.into();
let code = err.code(); let code = err.code();
let msg = CString::new(err.to_string()) let msg = CString::new(format!("{:?}", err))
.unwrap_or_else(|_| CString::new("invalid error").unwrap()); .unwrap_or_else(|_| CString::new("invalid error").unwrap());
let raw_msg = msg.into_raw(); let raw_msg = msg.into_raw();