windows: Show error messages when zed failed to lanuch (#32537)
Now, if either `WindowsPlatform` or `BladeRenderer` fails to initialize, a window will pop up to notify the user.  Release Notes: - N/A
This commit is contained in:
parent
7d5a5d0984
commit
a3cc063107
5 changed files with 33 additions and 13 deletions
|
@ -142,7 +142,11 @@ pub fn guess_compositor() -> &'static str {
|
|||
|
||||
#[cfg(target_os = "windows")]
|
||||
pub(crate) fn current_platform(_headless: bool) -> Rc<dyn Platform> {
|
||||
Rc::new(WindowsPlatform::new())
|
||||
Rc::new(
|
||||
WindowsPlatform::new()
|
||||
.inspect_err(|err| show_error("Error: Zed failed to launch", err.to_string()))
|
||||
.unwrap(),
|
||||
)
|
||||
}
|
||||
|
||||
pub(crate) trait Platform: 'static {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue