- Rename corex -> mytheclipse (corex name taken on crates.io by an unrelated crate published by David-Kunz in 2023) - Flatten corex + corex-core workspace into a single crate; all modules (context/error/io/compute/bg) now live directly under src/ - Update Cargo.toml metadata: real repo URL, docs.rs, author - Update README, example, doc comments, tracing span names - Fix CI: single package dry-run (corex-core no longer separate) - Fix publish workflow: single cargo publish step
29 lines
920 B
Rust
29 lines
920 B
Rust
//! Shared error type for mytheclipse execution primitives.
|
|
|
|
/// Errors surfaced by mytheclipse's panic-isolated execution primitives.
|
|
///
|
|
/// Marked `#[non_exhaustive]` so new variants can be added without a
|
|
/// breaking change; downstream `match` expressions should include a
|
|
/// wildcard arm.
|
|
#[non_exhaustive]
|
|
#[derive(Debug)]
|
|
pub enum CorexError {
|
|
/// A closure submitted to [`crate::compute::compute`] panicked.
|
|
///
|
|
/// The contained string is a best-effort rendering of the panic
|
|
/// payload; the compute thread pool itself remains usable afterward.
|
|
ComputePanic(String),
|
|
}
|
|
|
|
impl std::fmt::Display for CorexError {
|
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
|
match self {
|
|
Self::ComputePanic(message) => {
|
|
write!(f, "compute closure panicked: {message}")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
impl std::error::Error for CorexError {}
|