Skip to content

Commit

Permalink
make it easier to troubleshoot config parse errors
Browse files Browse the repository at this point in the history
Change the logging message displayed when the config file can't be
parsed: include the underlying exception text, so that a user who is
attepting to edit the config manually can find and fix any errors.
  • Loading branch information
x authored and accumulator committed Oct 24, 2022
1 parent 87ee303 commit fffbccf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions electrum/simple_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -717,8 +717,8 @@ def read_user_config(path):
with open(config_path, "r", encoding='utf-8') as f:
data = f.read()
result = json.loads(data)
except:
_logger.warning(f"Cannot read config file. {config_path}")
except Exception as exc:
_logger.warning(f"Cannot read config file at {config_path}: {exc}")
return {}
if not type(result) is dict:
return {}
Expand Down

0 comments on commit fffbccf

Please sign in to comment.