use std::path::PathBuf; use miette::Diagnostic; use thiserror::Error; pub type AppResult = std::result::Result; #[derive(Error, Diagnostic, Debug)] pub enum AppError { #[error("Error while evaluating nu script")] #[diagnostic()] Nu(miette::Error), #[error("Could not find the script file {0}")] ScriptNotFound(PathBuf), } impl From for AppError { fn from(e: miette::Error) -> Self { Self::Nu(e) } }