ruwuma/src/error.rs
Devin Ragotzy d8fb5ca112 Add benchmark for longer auth chain and Error type
This required that the code being run in the benchmark be tested to
verify it works correctly. Now work can begin cleaning up and optimizing
state-res.
2020-07-27 00:09:21 -04:00

24 lines
638 B
Rust

use std::num::ParseIntError;
use serde_json::Error as JsonError;
use thiserror::Error;
/// Result type for state resolution.
pub type Result<T> = std::result::Result<T, Error>;
/// Represents the various errors that arise when resolving state.
#[derive(Error, Debug)]
pub enum Error {
/// A deserialization error.
#[error(transparent)]
SerdeJson(#[from] JsonError),
/// An error that occurs when converting from JSON numbers to rust.
#[error(transparent)]
IntParseError(#[from] ParseIntError),
// TODO remove once the correct errors are used
#[error("an error occured {0}")]
TempString(String),
}