From 18c5c3fd34ceb8a1631f7766b69e407cf92e1a09 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Fri, 15 May 2026 21:54:11 +0800 Subject: Add panic catch for program execution --- mingling_core/src/asset/chain/error.rs | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'mingling_core/src/asset') diff --git a/mingling_core/src/asset/chain/error.rs b/mingling_core/src/asset/chain/error.rs index 5221e57..e5c753d 100644 --- a/mingling_core/src/asset/chain/error.rs +++ b/mingling_core/src/asset/chain/error.rs @@ -1,4 +1,4 @@ -use crate::error::{ProgramExecuteError, ProgramInternalExecuteError}; +use crate::error::ProgramInternalExecuteError; #[derive(thiserror::Error, Debug)] pub enum ChainProcessError { @@ -9,20 +9,6 @@ pub enum ChainProcessError { IO(#[from] std::io::Error), } -impl From for ChainProcessError { - fn from(value: ProgramExecuteError) -> Self { - match value { - ProgramExecuteError::DispatcherNotFound => { - ChainProcessError::Other("DispatcherNotFound".into()) - } - ProgramExecuteError::RendererNotFound(r) => { - ChainProcessError::Other(format!("RendererNotFound: {}", r)) - } - ProgramExecuteError::Other(e) => ChainProcessError::Other(e), - } - } -} - impl From for ChainProcessError { fn from(value: ProgramInternalExecuteError) -> Self { match value { -- cgit