diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-05-18 17:25:29 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-05-18 17:26:37 +0800 |
| commit | da5a750965dbec5a2c003faa8fb9f1dd110ccce8 (patch) | |
| tree | b793769ec40494c1ab056c65748c3393b5a849ed /mingling_core/src/program/exec | |
| parent | ab7c5785fb290541ad4361c0d46241817c3ff5f9 (diff) | |
Implement REPL execution with hooks and argument splitting
Diffstat (limited to 'mingling_core/src/program/exec')
| -rw-r--r-- | mingling_core/src/program/exec/error.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mingling_core/src/program/exec/error.rs b/mingling_core/src/program/exec/error.rs index 24112e1..0f2d875 100644 --- a/mingling_core/src/program/exec/error.rs +++ b/mingling_core/src/program/exec/error.rs @@ -60,6 +60,9 @@ pub enum ProgramInternalExecuteError { /// An other internal error occurred. Other(String), + /// A single REPL execution failed + REPLPanic(ProgramPanic), + /// An I/O error occurred during execution. IO(std::io::Error), } @@ -75,6 +78,9 @@ impl fmt::Display for ProgramInternalExecuteError { } ProgramInternalExecuteError::Other(s) => write!(f, "Other error: {}", s), ProgramInternalExecuteError::IO(e) => write!(f, "IO error: {}", e), + ProgramInternalExecuteError::REPLPanic(panic) => { + write!(f, "A single REPL execution failed: {}", panic) + } } } } @@ -105,6 +111,10 @@ impl From<ProgramInternalExecuteError> for ProgramExecuteError { } ProgramInternalExecuteError::Other(s) => ProgramExecuteError::Other(s), ProgramInternalExecuteError::IO(e) => ProgramExecuteError::Other(format!("{}", e)), + ProgramInternalExecuteError::REPLPanic(p) => ProgramExecuteError::Other(format!( + "A single REPL execution failed: {}", + p + )), } } } |
