aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mingling_core/src/asset/chain/error.rs4
-rw-r--r--mingling_core/src/program/exec/error.rs26
-rw-r--r--mingling_core/src/renderer/general/error.rs5
3 files changed, 35 insertions, 0 deletions
diff --git a/mingling_core/src/asset/chain/error.rs b/mingling_core/src/asset/chain/error.rs
index 39e4f62..4269c62 100644
--- a/mingling_core/src/asset/chain/error.rs
+++ b/mingling_core/src/asset/chain/error.rs
@@ -1,8 +1,12 @@
use crate::error::ProgramInternalExecuteError;
+/// Represents errors that can occur during chain processing.
#[derive(Debug)]
pub enum ChainProcessError {
+ /// An error with a custom description.
Other(String),
+
+ /// An I/O error that occurred during chain processing.
IO(std::io::Error),
}
diff --git a/mingling_core/src/program/exec/error.rs b/mingling_core/src/program/exec/error.rs
index 2790a7b..24112e1 100644
--- a/mingling_core/src/program/exec/error.rs
+++ b/mingling_core/src/program/exec/error.rs
@@ -1,11 +1,23 @@
use crate::error::{ChainProcessError, ProgramPanic};
use std::fmt;
+/// Errors that can occur during program execution.
+///
+/// This enum represents the various error conditions that may arise
+/// when executing a program, including missing dispatchers/renderers,
+/// panics, and other miscellaneous errors.
#[derive(Debug)]
pub enum ProgramExecuteError {
+ /// No dispatcher was found to handle the program execution.
DispatcherNotFound,
+
+ /// No renderer was found for the given name.
RendererNotFound(String),
+
+ /// The program encountered a panic during execution.
Panic(ProgramPanic),
+
+ /// An other error occurred.
Other(String),
}
@@ -30,11 +42,25 @@ impl From<ProgramPanic> for ProgramExecuteError {
}
}
+/// Errors that can occur during internal program execution.
+///
+/// This enum represents error conditions that arise specifically within
+/// the internal execution pipeline of a program, including missing
+/// dispatchers/renderers, I/O errors, and other miscellaneous failures.
+/// These errors are typically not exposed directly to the end user but
+/// are used internally and can be converted into [`ProgramExecuteError`].
#[derive(Debug)]
pub enum ProgramInternalExecuteError {
+ /// No dispatcher was found to handle the program execution.
DispatcherNotFound,
+
+ /// No renderer was found for the given name.
RendererNotFound(String),
+
+ /// An other internal error occurred.
Other(String),
+
+ /// An I/O error occurred during execution.
IO(std::io::Error),
}
diff --git a/mingling_core/src/renderer/general/error.rs b/mingling_core/src/renderer/general/error.rs
index c462017..a61b19d 100644
--- a/mingling_core/src/renderer/general/error.rs
+++ b/mingling_core/src/renderer/general/error.rs
@@ -1,5 +1,10 @@
+/// Represents an error that occurs during serialization of a general renderer.
+///
+/// This error stores a human-readable message describing what went wrong
+/// during the serialization process.
#[derive(Debug)]
pub struct GeneralRendererSerializeError {
+ /// The underlying error message.
error: String,
}