ExifTool Forum

ExifTool => Bug Reports / Feature Requests => Topic started by: Mac2 on October 05, 2011, 11:35:07 AM

Title: Numerical Error Messages and Warnings
Post by: Mac2 on October 05, 2011, 11:35:07 AM
ExifTool emits error messages and warnings via stderr and we can catch these messages with little effort when using the exiftool.exe from other applications.

Processing these textual messages and find the appropriate actions is more difficult. I currently do string compares / greps to detect certain errors/warnings and handle them. Luckily error messages are not (yet) localized and you don't change them often (or at all).

I have looked at the source code and I know that the error messages are spread all over the code. So this might be a stretch  :-[
But would it be thinkable (very low on your list) to append some sort of unique number to each warning/error message?

Like changing

Error opening c:\images\bla.jpg for writing

into

Error opening c:\images\bla.jpg for writing [5]

It would be safer and more reliable to parse for the numerical error code "5" at the end of the message instead of doing text compares.
Title: Re: Numerical Error Messages and Warnings
Post by: Phil Harvey on October 05, 2011, 01:23:30 PM
Thanks for the suggestion.

This feature would be easy to add at the same time as I add support for localized error strings, so I will tie it to this feature request (which is currently number 124 on the to-do list -- still a long, long way off).

- Phil
Title: Re: Numerical Error Messages and Warnings
Post by: Mac2 on October 05, 2011, 05:26:10 PM
Ah, well. Localizing the error messages would make it even harder to handle them in an application. So this will fit nicely together.

Quotewhich is currently number 124 on the to-do list
Aaahh, isn't it nice to know exactly what to do with all these rainy boring evenings without anything on the telly?  ::)
(From a programmer spending a large share of his spare time developing applications and tools for others)
Title: Re: Numerical Error Messages and Warnings
Post by: Phil Harvey on October 06, 2011, 09:11:58 AM
Just a heads up:

I have had a request (https://exiftool.org/forum/index.php/topic,3633) to change one of the warning messages.

- Phil
Title: Re: Numerical Error Messages and Warnings
Post by: Mac2 on October 07, 2011, 09:46:26 AM
Oh. What joy awaits when you ever consider localizing all these messages  :)
Title: Re: Numerical Error Messages and Warnings
Post by: Phil Harvey on October 07, 2011, 10:20:02 AM
Exactly.  Truth be told I had already implemented localized warning/error messages in a test version of ExifTool, but scrapped the feature without releasing it for reasons like this.

- Phil