Added NoUserInfo, NoMessageText and HandlerUsed error types to decrease the amount of unwraps
This commit is contained in:
11
src/errors.rs
Normal file
11
src/errors.rs
Normal file
@@ -0,0 +1,11 @@
|
||||
#[derive(thiserror::Error, Debug)]
|
||||
#[error("No user info found")]
|
||||
pub struct NoUserInfo;
|
||||
|
||||
#[derive(thiserror::Error, Debug)]
|
||||
#[error("Message text not found")]
|
||||
pub struct NoMessageText;
|
||||
|
||||
#[derive(thiserror::Error, Debug)]
|
||||
#[error("Handler was already used")]
|
||||
pub struct HandlerUsed;
|
Reference in New Issue
Block a user