Closed SludgePhD closed 1 year ago
Yes, I'm waiting for extern "C-unwind"
to be stabilized. Until then it's technically UB.
You need to use catch_unwind
to handle errors from this crate. Unfortunately, libjpeg can't signal errors without unwinding.
C-unwind is now stable.
This
extern "C" fn
explicitly unwinds:https://github.com/ImageOptim/mozjpeg-rust/blob/d0acb82928625e4828ca48b3a6c703c36178a971/src/errormgr.rs#L37-L41
Additionally, it seemingly intentionally makes my program silently exit with an error status, without printing the actual error to stderr. Why? :laughing: