pedrocr / rawloader

rust library to extract the raw data and some metadata from digital camera images
GNU Lesser General Public License v2.1
314 stars 54 forks source link

Error Message With Full UTF Character (instead of only first UTF byte) #13

Closed johannesvollmer closed 6 years ago

johannesvollmer commented 6 years ago

When, for example, instantiating a CFA with the pattern "RGü", where 'ü' consists of two bytes, the error message would print only the first byte of 'ü'.

In this pull request, the error message contains the full unknown character and also prints the whole pattern containing the character.

Also, I simplified all panic message formatting in this file.

pedrocr commented 6 years ago

Thanks! I use #chimper on irc.mozilla.org to discuss these kinds of things if you want to join.

johannesvollmer commented 6 years ago

Thanks for merging. I'll try to have a look at the irc