create SerdeError for ScriptError

reason: to handle errors from call of from_js
This commit is contained in:
Akulij 2025-05-19 23:57:22 +05:00
parent eb63743714
commit 3f8f25fff9

View File

@ -13,6 +13,8 @@ pub enum ScriptError {
ContextError(#[from] ContextError), ContextError(#[from] ContextError),
#[error("error running: {0:?}")] #[error("error running: {0:?}")]
ExecutionError(#[from] ExecutionError), ExecutionError(#[from] ExecutionError),
#[error("error from anyhow: {0:?}")]
SerdeError(#[from] quickjs_rusty::serde::Error),
} }
pub type ScriptResult<T> = Result<T, ScriptError>; pub type ScriptResult<T> = Result<T, ScriptError>;