show err if failed to create new window

Junkui Zhang created

Change summary

crates/gpui/src/platform/windows/platform.rs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Detailed changes

crates/gpui/src/platform/windows/platform.rs 🔗

@@ -462,7 +462,8 @@ impl Platform for WindowsPlatform {
             options,
             self.generate_creation_info(),
             &self.directx_devices,
-        )?;
+        )
+        .inspect_err(|err| show_error("Failed to open new window", err.to_string()))?;
         let handle = window.get_raw_handle();
         self.raw_window_handles.write().push(handle);