chore: cleanup setup error usage (#1588)

This commit is contained in:
Lucas Fernandes Nogueira 2021-04-22 19:14:02 -03:00 committed by GitHub
parent a33286e430
commit 0234336d6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -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}")]

View File

@ -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(())
}