update exception for new exception handling

This commit is contained in:
Jonathan Wren 2022-05-17 08:43:49 -07:00
parent d58cb31241
commit 3381ca752c
2 changed files with 14 additions and 2 deletions

View file

@ -78,8 +78,15 @@ def load_or_install_jrnl(alt_config_path):
config = load_config(config_path) config = load_config(config_path)
if config is None: if config is None:
print("Unable to parse config file", file=sys.stderr) raise JrnlException(
sys.exit() Message(
MsgText.CantParseConfigFile,
MsgStyle.ERROR,
{
"config_path": config_path,
},
)
)
if is_old_version(config_path): if is_old_version(config_path):
from jrnl import upgrade from jrnl import upgrade

View file

@ -121,6 +121,11 @@ class MsgText(Enum):
Removing this file will allow jrnl to save its configuration. Removing this file will allow jrnl to save its configuration.
""" """
CantParseConfigFile = """
Unable to parse config file at:
{config_path}
"""
LineWrapTooSmallForDateFormat = """ LineWrapTooSmallForDateFormat = """
The provided linewrap value of {config_linewrap} is too small by The provided linewrap value of {config_linewrap} is too small by
{columns} columns to display the timestamps in the configured time {columns} columns to display the timestamps in the configured time