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)
//     }
// }
lproxy typesMax Audron-253/+376 2021-01-21add to and from network deriveMax Audron-42/+2767 2021-01-21reorganize tests and add quassel featuresMax Audron-551/+850 2021-01-04add example program: quasselproxyclientMax Audron-0/+280 and inspection proxy for quassel 2021-01-04random stuffMax Audron-2/+9 2021-01-04add more signalproxy objectsMax Audron-40/+120 2021-01-04add message parsing feature flagsMax Audron-43/+96 2021-01-04fix parsing of datetime when value is -1Max Audron-1/+9 2021-01-02update dependenciesMax Audron-267/+27 2021-01-02rework handshakemessage parsingMax Audron-141/+278 2020-10-16updateMax Audron-1553/+294 2020-10-16update paperworkMax Audron-487/+391