vos-error 0.3.2

Virtual Object Schema shared error types
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use diagnostic::DiagnosticLevel;

use semver::Error;

use crate::{VosError, VosErrorKind};

impl From<Error> for VosError {
    fn from(error: Error) -> Self {
        let e = error.to_string();
        Self { kind: Box::new(VosErrorKind::ParseError(e)), level: DiagnosticLevel::Error, file: Default::default() }
    }
}