use datavalue::OwnedDataValue;
use std::borrow::Cow;
use std::sync::Arc;
pub type CustomErrorSource = Arc<dyn std::error::Error + Send + Sync + 'static>;
#[non_exhaustive]
#[derive(Debug, Clone)]
pub enum ErrorKind {
InvalidOperator(Cow<'static, str>),
InvalidArguments(Cow<'static, str>),
VariableNotFound(Cow<'static, str>),
InvalidContextLevel(isize),
TypeError(Cow<'static, str>),
ArithmeticError(Cow<'static, str>),
Custom(CustomErrorSource),
ParseError(Cow<'static, str>),
Thrown(OwnedDataValue),
FormatError(Cow<'static, str>),
IndexOutOfBounds { index: isize, length: usize },
ConfigurationError(Cow<'static, str>),
}