add no_home_dir error

This commit is contained in:
glyph 2021-11-04 16:57:58 +02:00
parent c91506f0c9
commit 42a43189fc
1 changed files with 7 additions and 0 deletions

View File

@ -20,6 +20,7 @@ pub enum SbotCliError {
InvalidUtf8(Utf8Error),
// external errors
InvalidRegex(RegexError),
NoHomeDir,
}
impl error::Error for SbotCliError {}
@ -57,6 +58,12 @@ impl fmt::Display for SbotCliError {
SbotCliError::InvalidRegex(ref err) => {
write!(f, "{}", err)
}
SbotCliError::NoHomeDir => {
write!(
f,
"Error initialising sbotcli: no home directory could be determined"
)
}
}
}
}