palladium_runtime/multi_core/
errors.rs1#[derive(Debug)]
3pub enum EngineError {
4 ThreadSpawnFailed(std::io::Error),
6}
7
8impl std::fmt::Display for EngineError {
9 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10 match self {
11 Self::ThreadSpawnFailed(e) => write!(f, "failed to spawn engine thread: {e}"),
12 }
13 }
14}
15
16impl std::error::Error for EngineError {}
17
18#[derive(Debug)]
20pub enum ShutdownError {
21 ThreadPanic,
23}
24
25impl std::fmt::Display for ShutdownError {
26 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
27 match self {
28 Self::ThreadPanic => {
29 write!(f, "one or more engine threads panicked during shutdown")
30 }
31 }
32 }
33}
34
35impl std::error::Error for ShutdownError {}