From 6b8395152b8e0c7ddd714e195e4e92d464b8147c Mon Sep 17 00:00:00 2001 From: tcmal Date: Sun, 25 Aug 2024 17:44:24 +0100 Subject: refactor(skeleton): move LevelError to render --- stockton-skeleton/src/error.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'stockton-skeleton') diff --git a/stockton-skeleton/src/error.rs b/stockton-skeleton/src/error.rs index 15df7ff..d9d0ceb 100644 --- a/stockton-skeleton/src/error.rs +++ b/stockton-skeleton/src/error.rs @@ -2,6 +2,8 @@ use thiserror::Error; +/// An error caused by a lock being poisoned. +/// This indicates an issue somewhere else, in another thread. #[derive(Error, Debug)] pub enum LockPoisoned { #[error("Device lock poisoned")] @@ -51,6 +53,7 @@ pub enum EnvironmentError { MemoryPoolMissing, } +/// Indicates invalid usage of an API. #[derive(Debug, Error)] pub enum UsageError { #[error("Attempt to create mappable memory block from non-mappable memory")] @@ -60,13 +63,7 @@ pub enum UsageError { QueueNegotiatorMisuse, } -/// Indicates an issue with the level object being used -#[derive(Debug, Error)] -pub enum LevelError { - #[error("Referential Integrity broken")] - BadReference, -} - +/// Displays an error with full backtrace pub fn full_error_display(err: anyhow::Error) -> String { let cont = err .chain() -- cgit v1.2.3