robinkrahl / LrMediaWiki

MediaWiki for Lightroom
https://commons.wikimedia.org/wiki/Commons:LrMediaWiki
Other
13 stars 7 forks source link

Exception handling if a variable is empty missing #100

Open toresetre opened 6 years ago

toresetre commented 6 years ago

Better exception handling if a variable is missing (for example PersonShown). Avoid issues like this: https://commons.wikimedia.org/w/index.php?title=File%3AH%C3%A5kon_Kornstad_Nasjonal_Jazzscene_2018_%28205143%29.jpg&type=revision&diff=290413067&oldid=290412994.

One way to deal with this is to leave the field empty. Or to abort the export.

Hasenlaeufer commented 3 years ago

Milestone 1.0

Hasenlaeufer commented 3 years ago

A substitution of a placeholder by something empty seems not to be the best option. The user should be informed what went wrong by the name of the placeholder and the name of the file. Abort the export should allow the user to fix the error. Another error source is a misspelled placeholder name. This kind of error should be dealt similar.

Hasenlaeufer commented 3 years ago

The implementation considers an unresolved placeholder or a misspelled placeholder to be an error. If multiple files are concerned, the export aborts at the first occurence.

Hasenlaeufer commented 3 years ago

Implemented by v1.0.2