Create errors module with basic error

This commit is contained in:
Victor Mignot 2022-10-18 23:20:33 -04:00
parent 70c10be0d8
commit ae27d92b68
No known key found for this signature in database
GPG key ID: FFE4EF056FB5E0D0

14
src/errors.rs Normal file
View file

@ -0,0 +1,14 @@
//! Common Yorokobot errors
use mongodb::error::Error as MongoError;
use serenity::prelude::SerenityError;
/// The kind of errors that can be returned by Client::new
#[derive(Debug)]
pub enum ClientsError {
/// Serenity error while building client
Discord(SerenityError),
///Mongo error while parsing options
Database(MongoError),
}