aboutsummaryrefslogtreecommitdiff
path: root/src/error/mod.rs
blob: 72a9e59dc3901f904f39b781e48f29ca316cb4d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
 #[derive(Debug, Fail)]
pub enum ProtocolError {
    #[fail(display = "message has wrong type")]
    WrongMsgType,
    #[fail(display = "bool value is neither 0 nor 1")]
    BoolOutOfRange,
    #[fail(display = "QVariant is not known")]
    UnknownVariant,
    #[fail(display = "wrong variant has been given")]
    WrongVariant,
    #[fail(display = "io error")]
    IOError(std::io::Error),
    #[fail(display = "could not convert from int")]
    TryFromIntError(std::num::TryFromIntError),
    #[fail(display = "utf8 error")]
    Utf8Error(std::string::FromUtf8Error),
 }

// impl std::error::Error for ErrorKind {}
//
// impl std::convert::From<std::io::Error> for ErrorKind {
//     fn from(error: std::io::Error) -> Self {
//         ErrorKind::IOError(error)
//     }
// }
//
// impl std::convert::From<std::num::TryFromIntError> for ErrorKind {
//     fn from(error: std::num::TryFromIntError) -> Self {
//         ErrorKind::TryFromIntError(error)
//     }
// }
//
// impl std::convert::From<std::string::FromUtf8Error> for ErrorKind {
//     fn from(error: std::string::FromUtf8Error) -> Self {
//         ErrorKind::Utf8Error(error)
//     }
// }
mmit/src/primitive/mod.rs?id=14bce9f885ecfb4a0309a7aa398db033f1cc542e&follow=1'>Add BufferId as Rust typeTobias Deiminger-0/+39 2025-02-25Use MsgId in MessageTobias Deiminger-18/+6 2025-02-25Use MsgId in VariantTobias Deiminger-20/+37 2025-02-25Add MsgId as Rust typeTobias Deiminger-0/+56 2025-02-24added session manager comments and log messageMax Audron-1/+3 2025-02-23add identity syncable to SessionManagerMax Audron-1/+8 2025-02-23add syncables for IrcUserMax Audron-2/+53 2025-02-23move network config to it's own file and impl it's syncMax Audron-23/+84 2025-02-23add basic network syncablesMax Audron-39/+420 2025-02-23clean up unused_import and unused_variables a bitMax Audron-2/+8 2025-02-23fix server feature errorsMax Audron-28/+23 2025-02-23fix ircchannel and maplist network representationMax Audron-154/+137 2025-02-22replace deprecated failure crate with thiserrorMax Audron-278/+194 2025-02-22update dependencies and fix errorsMax Audron-508/+332 2025-02-22update flakeMax Audron-94/+117 2024-05-22add todos to readmeMax Audron-16/+35