Log exception on invalid config

This commit is contained in:
Florian Bruhin 2014-07-10 22:39:24 +02:00
parent 0705d6087c
commit 4114308193

View File

@ -185,6 +185,7 @@ class Application(QApplication):
configparser.DuplicateSectionError, configparser.DuplicateSectionError,
configparser.DuplicateOptionError, configparser.DuplicateOptionError,
configparser.ParsingError) as e: configparser.ParsingError) as e:
log.init.exception(e)
errstr = "Error while reading config:" errstr = "Error while reading config:"
if hasattr(e, 'section') and hasattr(e, 'option'): if hasattr(e, 'section') and hasattr(e, 'option'):
errstr += "\n\n{} -> {}:".format(e.section, e.option) errstr += "\n\n{} -> {}:".format(e.section, e.option)