diff options
Diffstat (limited to 'src/error.rs')
-rw-r--r-- | src/error.rs | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/error.rs b/src/error.rs index a6f239e..89a10c1 100644 --- a/src/error.rs +++ b/src/error.rs @@ -34,14 +34,22 @@ pub enum JournalError { #[error("failed to create journal entry {0}: {1}")] WriteEntry(PathBuf, #[source] std::io::Error), - /// To many drafts. - #[error("there are already {0} drafts in {1}, can't create more")] - TooManyDrafts(usize, PathBuf), + /// Failed to write topic page. + #[error("failed to create topic page {0}: {1}")] + WriteTopic(PathBuf, #[source] std::io::Error), /// User chose a draft that doesn't exist. #[error("No draft {0} in {1}")] NoSuchDraft(String, PathBuf), + /// Too many drafts. + #[error("there are already {0} drafts in {1}, can't create more")] + TooManyDrafts(usize, PathBuf), + + /// User chose a topic that doesn't exist. + #[error("No topic page {0}")] + NoSuchTopic(PathBuf), + /// Failed to read draft. #[error("failed to drafts {0}: {1}")] ReadDraft(PathBuf, #[source] std::io::Error), |