notedown-error 1.1.10

Notedown Error Handlers
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::NoteError;
use num::{bigint::TryFromBigIntError, BigInt};
use rust_decimal::Error;

impl From<TryFromBigIntError<BigInt>> for NoteError {
    fn from(e: TryFromBigIntError<BigInt>) -> Self {
        Self::runtime_error(format!("{}", e))
    }
}

impl From<Error> for NoteError {
    fn from(e: Error) -> Self {
        Self::runtime_error(format!("{}", e))
    }
}