mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-17 11:38:32 +02:00
update exception for new exception handling
This commit is contained in:
parent
d58cb31241
commit
3381ca752c
2 changed files with 14 additions and 2 deletions
|
@ -78,8 +78,15 @@ def load_or_install_jrnl(alt_config_path):
|
|||
config = load_config(config_path)
|
||||
|
||||
if config is None:
|
||||
print("Unable to parse config file", file=sys.stderr)
|
||||
sys.exit()
|
||||
raise JrnlException(
|
||||
Message(
|
||||
MsgText.CantParseConfigFile,
|
||||
MsgStyle.ERROR,
|
||||
{
|
||||
"config_path": config_path,
|
||||
},
|
||||
)
|
||||
)
|
||||
|
||||
if is_old_version(config_path):
|
||||
from jrnl import upgrade
|
||||
|
|
|
@ -121,6 +121,11 @@ class MsgText(Enum):
|
|||
Removing this file will allow jrnl to save its configuration.
|
||||
"""
|
||||
|
||||
CantParseConfigFile = """
|
||||
Unable to parse config file at:
|
||||
{config_path}
|
||||
"""
|
||||
|
||||
LineWrapTooSmallForDateFormat = """
|
||||
The provided linewrap value of {config_linewrap} is too small by
|
||||
{columns} columns to display the timestamps in the configured time
|
||||
|
|
Loading…
Add table
Reference in a new issue