Skip to content

Conversation

@emilk
Copy link
Owner

@emilk emilk commented May 28, 2024

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(…).

@emilk emilk added the eframe Relates to epi and eframe label May 28, 2024
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`.
@emilk emilk force-pushed the emilk/fallible-app-creation branch from b90a0c9 to 2c921d7 Compare May 28, 2024 19:48
@emilk emilk merged commit 942fe4a into master May 28, 2024
@emilk emilk deleted the emilk/fallible-app-creation branch May 28, 2024 19:59
emilk added a commit that referenced this pull request May 29, 2024
@emilk emilk added feature New feature or request and removed feature New feature or request labels Jun 27, 2024
hacknus pushed a commit to hacknus/egui that referenced this pull request Oct 30, 2024
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 emilk#4474
hacknus pushed a commit to hacknus/egui that referenced this pull request Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

eframe Relates to epi and eframe

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow returning errors from eframe app creator

2 participants