use alloc::string::String;
use thiserror::Error;
use crate::func::{ParameterValue, ReturnValue};
#[derive(Error, Debug)]
pub enum Error {
#[error("Failed To Convert Parameter Value {0:?} to {1:?}")]
ParameterValueConversionFailure(ParameterValue, &'static str),
#[error("Failed To Convert Return Value {0:?} to {1:?}")]
ReturnValueConversionFailure(ReturnValue, &'static str),
#[error("The number of arguments to the function is wrong: got {0:?} expected {1:?}")]
UnexpectedNoOfArguments(usize, usize),
#[error("The parameter value type is unexpected got {0:?} expected {1:?}")]
UnexpectedParameterValueType(ParameterValue, String),
#[error("The return value type is unexpected got {0:?} expected {1:?}")]
UnexpectedReturnValueType(ReturnValue, String),
}