aboutsummaryrefslogtreecommitdiff
path: root/crates/msh-core/src/error.rs
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2026-06-22 12:12:27 +0300
committerValentin Popov <valentin@popov.link>2026-06-22 12:13:32 +0300
commitd0bdbaa1ed76dfbf3211bb43eee48c49cc4fd448 (patch)
treea0bd35c3940be62a5b5de1acc2366af377ffd181 /crates/msh-core/src/error.rs
parent7416fdc7e9a48837fff5056e6dc8d0774e90964b (diff)
downloadfparkan-d0bdbaa1ed76dfbf3211bb43eee48c49cc4fd448.tar.xz
fparkan-d0bdbaa1ed76dfbf3211bb43eee48c49cc4fd448.zip
feat: implement FParkan architecture foundation
Add the modular fparkan workspace, domain crates, adapters, apps, xtask policy/CI, acceptance evidence, and licensed corpus gates for the macOS-focused roadmap foundation.
Diffstat (limited to 'crates/msh-core/src/error.rs')
-rw-r--r--crates/msh-core/src/error.rs75
1 files changed, 0 insertions, 75 deletions
diff --git a/crates/msh-core/src/error.rs b/crates/msh-core/src/error.rs
deleted file mode 100644
index d46c7b1..0000000
--- a/crates/msh-core/src/error.rs
+++ /dev/null
@@ -1,75 +0,0 @@
-use core::fmt;
-
-#[derive(Debug)]
-#[non_exhaustive]
-pub enum Error {
- Nres(nres::error::Error),
- MissingResource {
- kind: u32,
- label: &'static str,
- },
- InvalidResourceSize {
- label: &'static str,
- size: usize,
- stride: usize,
- },
- InvalidRes2Size {
- size: usize,
- },
- UnsupportedNodeStride {
- stride: usize,
- },
- IndexOutOfBounds {
- label: &'static str,
- index: usize,
- limit: usize,
- },
- IntegerOverflow,
-}
-
-impl From<nres::error::Error> for Error {
- fn from(value: nres::error::Error) -> Self {
- Self::Nres(value)
- }
-}
-
-impl fmt::Display for Error {
- fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
- match self {
- Self::Nres(err) => write!(f, "{err}"),
- Self::MissingResource { kind, label } => {
- write!(f, "missing required resource type={kind} ({label})")
- }
- Self::InvalidResourceSize {
- label,
- size,
- stride,
- } => {
- write!(
- f,
- "invalid {label} size={size}, expected multiple of stride={stride}"
- )
- }
- Self::InvalidRes2Size { size } => {
- write!(f, "invalid Res2 size={size}, expected >= 140")
- }
- Self::UnsupportedNodeStride { stride } => {
- write!(
- f,
- "unsupported Res1 node stride={stride}, expected 38 or 24"
- )
- }
- Self::IndexOutOfBounds {
- label,
- index,
- limit,
- } => write!(
- f,
- "{label} index out of bounds: index={index}, limit={limit}"
- ),
- Self::IntegerOverflow => write!(f, "integer overflow"),
- }
- }
-}
-
-impl std::error::Error for Error {}