Introduce error handling in the FemtoVG and Skia renderers (#2402)

Avoid unwrap() and expect() and instead propagate errors all the way
down to run_event_loop(), show(), and hide() in the Slint AIP.
This commit is contained in:
Simon Hausmann 2023-03-24 14:18:11 +01:00 committed by GitHub
parent 7f95614a98
commit 8ffb5131c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
28 changed files with 627 additions and 357 deletions

View file

@ -498,7 +498,7 @@ declare_types! {
let this = cx.this();
let window = cx.borrow(&this, |x| x.0.as_ref().cloned());
let window_adapter = window.ok_or(()).or_else(|()| cx.throw_error("Invalid type"))?;
window_adapter.hide();
window_adapter.hide().unwrap();
Ok(JsUndefined::new().as_value(&mut cx))
}