new-home-application 0.1.3

New Home iot application framework. Meant to build application for the New Home Core
Documentation
use std::error::Error;
use std::fmt::{Display, Formatter, Result};

#[derive(Debug)]
pub struct ParserError {
    cause: Option<Box<dyn Error>>,
    details: String,
}

impl ParserError {
    pub fn new(cause: Option<Box<dyn Error>>, details: String) -> Self {
        Self {
            cause,
            details,
        }
    }
}

impl Display for ParserError {
    fn fmt(&self, f: &mut Formatter<'_>) -> Result {
        write!(f, "{}", self.details)
    }
}

impl Error for ParserError {}