Propagate error from EventLoop creation
Inner panics could make it hard to trouble shoot the issues and for some users ints not desirable. The inner panics were left only when they are used to `assert!` during development.
This commit is contained in:
parent
584aab4cd0
commit
ed26dd58fd
57 changed files with 344 additions and 291 deletions
|
|
@ -485,7 +485,7 @@ impl UnownedWindow {
|
|||
&mut supported_ptr,
|
||||
);
|
||||
if supported_ptr == ffi::False {
|
||||
return Err(os_error!(OsError::XMisc(
|
||||
return Err(os_error!(OsError::Misc(
|
||||
"`XkbSetDetectableAutoRepeat` failed"
|
||||
)));
|
||||
}
|
||||
|
|
@ -1488,7 +1488,7 @@ impl UnownedWindow {
|
|||
}
|
||||
_ => unreachable!(),
|
||||
}
|
||||
.map_err(|err| ExternalError::Os(os_error!(OsError::XMisc(err))))
|
||||
.map_err(|err| ExternalError::Os(os_error!(OsError::Misc(err))))
|
||||
}
|
||||
CursorGrabMode::Locked => {
|
||||
return Err(ExternalError::NotSupported(NotSupportedError::new()));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue