mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-12-01 11:13:40 +03:00
chore: cleanup setup error usage (#1588)
This commit is contained in:
parent
a33286e430
commit
0234336d6a
@ -51,8 +51,8 @@ pub enum Error {
|
||||
#[error("invalid args for command `{0}`: {1}")]
|
||||
InvalidArgs(&'static str, serde_json::Error),
|
||||
/// Encountered an error in the setup hook,
|
||||
#[error("error encountered during setup hood: {0}")]
|
||||
Setup(#[from] Box<dyn std::error::Error>),
|
||||
#[error("error encountered during setup hook: {0}")]
|
||||
Setup(String),
|
||||
/// Tauri updater error.
|
||||
#[cfg(feature = "updater")]
|
||||
#[error("Updater: {0}")]
|
||||
|
@ -262,7 +262,7 @@ where
|
||||
#[cfg(feature = "updater")]
|
||||
app.run_updater(main_window);
|
||||
|
||||
(self.setup)(&mut app)?;
|
||||
(self.setup)(&mut app).map_err(|e| crate::Error::Setup(e.to_string()))?;
|
||||
app.runtime.run();
|
||||
Ok(())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user