You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nenv/src/error.rs

26 lines
490 B
Rust

use std::io;
use miette::Diagnostic;
2 years ago
use thiserror::Error;
use crate::web_api::error::ApiError;
2 years ago
pub(crate) type LibResult<T> = Result<T>;
pub(crate) type LibError = Error;
pub type Result<T> = std::result::Result<T, Error>;
#[derive(Debug, Error, Diagnostic)]
pub enum Error {
#[error("Failed to call nodejs.com api: {0}")]
Web(
#[from]
#[source]
#[diagnostic_source]
ApiError,
),
#[error("IO Error: {0}")]
Io(#[from] io::Error),
}