Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support returning errors when creating the app #4565

Merged
merged 1 commit into from
May 28, 2024

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
35 checks passed
@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
1 participant