diff --git a/src/syntax_highlighting/config.py b/src/syntax_highlighting/config.py index e981b9e..f19f392 100644 --- a/src/syntax_highlighting/config.py +++ b/src/syntax_highlighting/config.py @@ -95,7 +95,10 @@ def _addonMeta(): try: meta = json.load(io.open(meta_path, encoding="utf-8")) - except (IOError, OSError, json.decoder.JSONDecodeError): + except (IOError, OSError): + meta = None + except json.decoder.JSONDecodeError as e: + print("Could not read meta.json: " + str(e)) meta = None if not meta: @@ -139,8 +142,8 @@ def _addonConfigDefaults(): try: return json.load(io.open(defaults_path, encoding="utf-8")) except (IOError, OSError, json.decoder.JSONDecodeError) as e: - raise Exception("External Editor for Text Files – " - "Config file could not be read: " + str(e)) + print("Could not read config.json: " + str(e)) + raise Exception("Config file could not be read: " + str(e)) def getConfig(): """Get user config dictionary