From 843572b487541ca98166d9748231c335063a2db3 Mon Sep 17 00:00:00 2001 From: Ethan Girouard Date: Mon, 29 Jun 2026 21:00:22 -0400 Subject: [PATCH] Add function to get source of error --- src/util/error.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/util/error.rs b/src/util/error.rs index a4c1d8e..3d585a0 100644 --- a/src/util/error.rs +++ b/src/util/error.rs @@ -111,6 +111,12 @@ impl Error { } } + /// Get the original cause of this error + /// Like `std::error::Error::source` but doesn't return an `Option` + pub fn source(&self) -> &ErrorType { + &self.source + } + /// Display this error as a modal dialog activated by a checkbox with the given id pub fn as_modal(&self, id: String) -> Element { rsx! {