yarl / pattypan

Upload files to Wikimedia Commons. The Spreadsheet Way.
https://commons.wikimedia.org/wiki/Commons:Pattypan
MIT License
56 stars 37 forks source link

Fix exception handling #176

Open tfmorris opened 1 year ago

tfmorris commented 1 year ago

The error reporting mechanism (at least in the Excel code) is to throw new Exception("Some random error message") which then means the caller needs to catch Exception just for run of the mill errors.

Instead a specific Exception subclass should be defined (e.g. PattypanException) which can then be thrown/caught instead of having to rely on catching the very broad java.lang.Exception which is going to be quite error prone.