1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! `errors` provides base error which is [`CommonError`]
use rst_common::with_errors::thiserror::{self, Error};

/// `CommonError` this kind of error types used for all common errors
#[derive(Debug, Error, PartialEq)]
pub enum CommonError {
    #[error("hex: unable to parse given hex: `{0}`")]
    ParseHexError(String),

    #[error("unable parse value: `{0}`")]
    ParseValueError(String),

    #[error("json: unable to parse given hex: `{0}`")]
    BuildJSONError(String),

    #[error("unknown: something unknown goes went wrong")]
    UnknownError,
}