Use more generic JrnlError with messaging switchboard

This commit is contained in:
Micah Jerome Ellison 2021-01-02 14:09:32 -08:00
parent 75269ede85
commit 7ac104a60d
4 changed files with 37 additions and 10 deletions

13
tests/test_exception.py Normal file
View file

@ -0,0 +1,13 @@
from jrnl.exception import JrnlError
def test_config_directory_exception_message():
ex = JrnlError(
"ConfigDirectoryIsFile", config_directory_path="/config/directory/path"
)
assert ex.message == (
"The path to your jrnl configuration directory is a file, not a directory:\n"
+ "/config/directory/path\n"
+ "Removing this file will allow jrnl to save its configuration."
)