Support returning errors when creating the app (#4565)
The closure passed to `eframe::run_native` now returns a `Result`, allowing you to return an error during app creation, which will be returned to the caller of `run_native`. This means you need to wrap your `Box::new(MyApp::new(…))` in an `Ok(…)`. * Closes https://github.com/emilk/egui/issues/4474
This commit is contained in:
@@ -54,7 +54,7 @@ impl WebRunner {
|
||||
/// Create the application, install callbacks, and start running the app.
|
||||
///
|
||||
/// # Errors
|
||||
/// Failing to initialize graphics.
|
||||
/// Failing to initialize graphics, or failure to create app.
|
||||
pub async fn start(
|
||||
&self,
|
||||
canvas_id: &str,
|
||||
|
||||
Reference in New Issue
Block a user