improve error handling on band and bookmark loading

This commit is contained in:
Jakob Ketterl 2020-02-01 21:37:43 +01:00
parent 41bc168a38
commit 8036758857
3 changed files with 9 additions and 3 deletions

View File

@ -58,7 +58,10 @@ class Bandplan(object):
except FileNotFoundError:
pass
except json.JSONDecodeError:
logger.exception("error while parsing bandplan from %s", file)
logger.exception("error while parsing bandplan file %s", file)
return []
except Exception:
logger.exception("error while processing bandplan from %s", file)
return []
return []

View File

@ -50,7 +50,10 @@ class Bookmarks(object):
except FileNotFoundError:
pass
except json.JSONDecodeError:
logger.exception("error while parsing bookmarks from %s", file)
logger.exception("error while parsing bookmarks file %s", file)
return []
except Exception:
logger.exception("error while processing bookmarks from %s", file)
return []
return []

View File

@ -145,5 +145,5 @@ class PropertyManager(object):
self[name] = value
return self
except FileNotFoundError:
logger.debug("not found: %s", file)
pass
raise ConfigNotFoundException("no usable config found! please make sure you have a valid configuration file!")