summaryrefslogtreecommitdiff
path: root/src/error.rs
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2021-09-23 09:42:32 +0300
committerLars Wirzenius <liw@liw.fi>2021-09-23 09:42:32 +0300
commitc88ef5bf4c78d8c06b81e35f2806d280bbcca479 (patch)
tree440bb310e355282b279bfe802f5170a9e9f5dc7b /src/error.rs
parentb8e537e103d540a6d8dbb540676147ea2a88b89d (diff)
downloadjt2-c88ef5bf4c78d8c06b81e35f2806d280bbcca479.tar.gz
fix: if a topic path contains missing directories, create them
Sponsored-by: author
Diffstat (limited to 'src/error.rs')
-rw-r--r--src/error.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/error.rs b/src/error.rs
index 04ba777..c86ad13 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -22,6 +22,10 @@ pub enum JournalError {
#[error("directory {0} is not a journal")]
NotAJournal(String),
+ /// The specified directory for the journal does not exist.
+ #[error("journal directory does not exist: {0}")]
+ NoJournalDirectory(PathBuf),
+
/// Failed to create the directory for the journal.
#[error("failed to create journal directory {0}")]
CreateDirectory(PathBuf, #[source] std::io::Error),