use thiserror::Error;
#[derive(Debug, Error)]
pub enum RecipeError {
#[error("Bloomberg engine error: {0}")]
Engine(#[source] Box<xbbg_async::BlpAsyncError>),
#[error("Extension utility error: {0}")]
Ext(#[from] xbbg_ext::ExtError),
#[error("Arrow error: {0}")]
Arrow(#[from] arrow_schema::ArrowError),
#[error("Invalid argument: {0}")]
InvalidArgument(String),
#[error("Recipe error: {0}")]
Other(String),
}
impl From<xbbg_async::BlpAsyncError> for RecipeError {
fn from(value: xbbg_async::BlpAsyncError) -> Self {
Self::Engine(Box::new(value))
}
}
pub type Result<T> = std::result::Result<T, RecipeError>;