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.
embed-nu/src/error.rs

18 lines
417 B
Rust

use nu_parser::ParseError;
use nu_protocol::ShellError;
use thiserror::Error;
pub type CrateResult<T> = std::result::Result<T, CrateError>;
#[derive(Clone, Debug, Error)]
pub enum CrateError {
#[error("Shell Error {0}")]
NuShellError(#[from] ShellError),
#[error("Parse Error {0}")]
NuParseError(#[from] ParseError),
#[error("Could not find the function {0}")]
FunctionNotFound(String),
}