nlfiedler / magick-rust

Rust bindings for ImageMagick
https://crates.io/crates/magick_rust
Apache License 2.0
254 stars 68 forks source link

Better error messages? #49

Open vpzomtrrfrt opened 5 years ago

vpzomtrrfrt commented 5 years ago

The functions in this crate return very generic error messages, like "failed to write image". Would it be possible to give more information about exactly what failed?

nlfiedler commented 5 years ago

It looks like someone has already introduced bindings for MagickGetExceptionType() and MagickGetException() on the wand object, named get_exception_type() and get_exception(), respectively. I haven't maintained this library in some time, so I can't provide an example, but I suspect it should be as easy as calling those functions.

vpzomtrrfrt commented 5 years ago

Looks like those are private?

nlfiedler commented 5 years ago

Shoot, sorry about that. I made them public and pushed an update. Let me know if that helps.