mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-29 21:34:50 +00:00
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:
parent
7f95614a98
commit
8ffb5131c7
28 changed files with 627 additions and 357 deletions
|
@ -191,8 +191,8 @@ impl WrappedInstance {
|
|||
}
|
||||
/// Hides this instance and prevents further updates of the canvas element.
|
||||
#[wasm_bindgen]
|
||||
pub fn hide(&self) {
|
||||
self.0.hide();
|
||||
pub fn hide(&self) -> Result<(), JsValue> {
|
||||
self.0.hide().map_err(|e| -> JsValue { format!("{e}").into() })
|
||||
}
|
||||
|
||||
/// THIS FUNCTION IS NOT PART THE PUBLIC API!
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue