Add function to get source of error
All checks were successful
Push Workflows / rustfmt (push) Successful in 5s
Push Workflows / tailwind-build (push) Successful in 5s
Push Workflows / docs (push) Successful in 21s
Push Workflows / clippy (push) Successful in 19s
Push Workflows / test (push) Successful in 27s
Push Workflows / build (push) Successful in 54s
Push Workflows / nix-build (push) Successful in 5m15s
All checks were successful
Push Workflows / rustfmt (push) Successful in 5s
Push Workflows / tailwind-build (push) Successful in 5s
Push Workflows / docs (push) Successful in 21s
Push Workflows / clippy (push) Successful in 19s
Push Workflows / test (push) Successful in 27s
Push Workflows / build (push) Successful in 54s
Push Workflows / nix-build (push) Successful in 5m15s
This commit is contained in:
@@ -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
|
/// Display this error as a modal dialog activated by a checkbox with the given id
|
||||||
pub fn as_modal(&self, id: String) -> Element {
|
pub fn as_modal(&self, id: String) -> Element {
|
||||||
rsx! {
|
rsx! {
|
||||||
|
|||||||
Reference in New Issue
Block a user