A simple CPU rendered GUI IDE experience.
Diffstat (limited to 'src/error.rs')
-rw-r--r--src/error.rs27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/error.rs b/src/error.rs
new file mode 100644
index 0000000..1cd945f
--- /dev/null
+++ b/src/error.rs
@@ -0,0 +1,27 @@
+#[derive(Copy, Clone)]
+pub struct WDebug;
+
+impl<C> rootcause::handlers::ContextHandler<C> for WDebug
+where
+ C: core::fmt::Debug,
+{
+ fn source(
+ _context: &C,
+ ) -> Option<&(dyn core::error::Error + 'static)> {
+ None
+ }
+
+ fn display(
+ c: &C,
+ f: &mut core::fmt::Formatter<'_>,
+ ) -> core::fmt::Result {
+ core::fmt::Debug::fmt(c, f)
+ }
+
+ fn debug(
+ context: &C,
+ f: &mut core::fmt::Formatter<'_>,
+ ) -> core::fmt::Result {
+ core::fmt::Debug::fmt(context, f)
+ }
+}