~openlp-core/openlp/trunk

Viewing all changes in revision 2829.

  • Committer: Tomas Groth
  • Author(s): simhnna at gmail
  • Date: 2018-08-18 20:16:14 UTC
  • mfrom: (2828.1.2 improve-logging)
  • Revision ID: tomasgroth@yahoo.dk-20180818201614-n36pp3ypq59pln0h
Instead of raising an error when converting paths, return None and log an error.

The method is allowed to return None, so calling functions should handle that. Raising an error is very rude behavior and the output just said that the input was invalid with no real clue as to what is wrong.

Now None is returned without causing too much hassle, and a proper error is logged mentioning what exactly caused the error.

The test case was updated.

This is sort of related to https://bugs.launchpad.net/openlp/+bug/1786601 in that this would have been nice to actually know what went wrong and failback to None.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: