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/program/exec/error.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'mingling_core/src/program/exec') diff --git a/mingling_core/src/program/exec/error.rs b/mingling_core/src/program/exec/error.rs index b4ff378..2d806dc 100644 --- a/mingling_core/src/program/exec/error.rs +++ b/mingling_core/src/program/exec/error.rs @@ -1,4 +1,4 @@ -use crate::error::ChainProcessError; +use crate::error::{ChainProcessError, ProgramPanic}; #[derive(thiserror::Error, Debug)] pub enum ProgramExecuteError { @@ -8,6 +8,9 @@ pub enum ProgramExecuteError { #[error("No Renderer (`{0}`) Found")] RendererNotFound(String), + #[error("Panic: {0:?}")] + Panic(#[from] ProgramPanic), + #[error("Other error: {0}")] Other(String), } -- cgit