mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-13 14:28:27 +00:00
Improve error handling
This commit is contained in:
parent
72fcf21580
commit
9cb33e8bd3
@ -27,9 +27,15 @@ struct App {
|
|||||||
impl ApplicationHandler for App {
|
impl ApplicationHandler for App {
|
||||||
fn resumed(&mut self, event_loop: &ActiveEventLoop) {
|
fn resumed(&mut self, event_loop: &ActiveEventLoop) {
|
||||||
let window = {
|
let window = {
|
||||||
let window = event_loop
|
let window =
|
||||||
.create_window(WindowAttributes::default())
|
match event_loop.create_window(WindowAttributes::default()) {
|
||||||
.unwrap();
|
Ok(window) => window,
|
||||||
|
Err(err) => {
|
||||||
|
eprintln!("Failed to create window: `{err:?}`");
|
||||||
|
event_loop.exit();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
Arc::new(window)
|
Arc::new(window)
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user