ImageOptim / mozjpeg-rust

Safe Rust wrapper for the MozJPEG library
https://lib.rs/mozjpeg
Other
74 stars 19 forks source link

How to get error message? #40

Closed SalOne22 closed 6 months ago

SalOne22 commented 6 months ago

I'm creating my own image optimization tool. Currently my implementation sets the default error message to: "Something went wrong." How can I extract the error message from catch_unwind? This function returns Any and this can be used to determine the type of a variable. What exactly is the type of error message?

SalOne22 commented 6 months ago

Nevermind, looked into source code, found that type is String