diff options
Diffstat (limited to 'webapp/src/components/app_context_provider.rs')
-rw-r--r-- | webapp/src/components/app_context_provider.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/webapp/src/components/app_context_provider.rs b/webapp/src/components/app_context_provider.rs index 7ca0cf3..6298c2b 100644 --- a/webapp/src/components/app_context_provider.rs +++ b/webapp/src/components/app_context_provider.rs @@ -51,6 +51,12 @@ impl AppContext { self.state.error.as_ref() } + pub fn set_error(&self, error: anyhow::Error) { + self.state.error.set(Some(ErrorInfoProperties { + message: format!("{error:?}"), + })); + } + pub fn create_table(&self) { let user = self.state.user.clone(); let history = self.history.clone(); |