pdf icon indicating copy to clipboard operation
pdf copied to clipboard

Strange error message "try at"

Open qarmin opened this issue 3 years ago • 4 comments

Issue copied from https://github.com/qarmin/czkawka/issues/898 (Op used 0.7.2 version, but with 0.8 same problem happens)

Looks that some pdfs fails to open with strange message try at ... .rs. Such messages should be clear, but are not.

Example file - Long.Harry.pdf

ff

qarmin avatar Jan 19 '23 15:01 qarmin

This is generated from the t! macro unwrapping an Option.

s3bk avatar Jan 19 '23 16:01 s3bk

https://github.com/pdf-rs/pdf/blob/master/pdf/src/error.rs#L243

s3bk avatar Jan 19 '23 16:01 s3bk

In app I changed this from

Try at /user/pdf.rs:277.rs

into

Decoding error in pdf-rs library -  /user/pdf.rs:277.rs

so maybe same thing could be done directly here?

There is also different error "Shared" which is visible without any context https://github.com/pdf-rs/pdf/blob/677152fa8e84a2dcfbc3d927535148bb8d0369ba/pdf/src/error.rs#L14-L15

qarmin avatar Jun 09 '23 19:06 qarmin

You can create custom messages for any t! occurence, but i am lazy.

s3bk avatar Jun 09 '23 19:06 s3bk