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

Fallible systems need to report failures #16718

Closed
alice-i-cecile opened this issue Dec 8, 2024 · 1 comment
Closed

Fallible systems need to report failures #16718

alice-i-cecile opened this issue Dec 8, 2024 · 1 comment
Labels
A-ECS Entities, components, systems, and events C-Usability A targeted quality-of-life change that makes Bevy easier to use S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it!
Milestone

Comments

@alice-i-cecile
Copy link
Member

As of #16589, systems which fail will just silently do nothing.

This is a fine choice to offer, but not a good default behavior since it masks real bugs in users games. Until we get a more sophisticated error handling mechanism in place, we should make this panic for now.

@alice-i-cecile alice-i-cecile added A-ECS Entities, components, systems, and events C-Usability A targeted quality-of-life change that makes Bevy easier to use S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it! labels Dec 8, 2024
@alice-i-cecile alice-i-cecile added this to the 0.16 milestone Dec 8, 2024
@alice-i-cecile
Copy link
Member Author

I've opened this issue to ensure that we don't ship the current behavior. The suggestion to panic is a reasonable stop-gap, and should have been done in the initial PR.

github-merge-queue bot pushed a commit that referenced this issue Dec 27, 2024
# Objective

- First step for #16718 
- #16589 introduced an api that can only ignore errors, which is risky

## Solution

- Panic instead of just ignoring the errors

## Testing

- Changed the `fallible_systems` example to return an error
```
Encountered an error in system `fallible_systems::setup`: TooManyVertices { subdivisions: 300, number_of_resulting_points: 906012 }
Encountered a panic in system `fallible_systems::setup`!
Encountered a panic in system `bevy_app::main_schedule::Main::run_main`!
```
ecoskey pushed a commit to ecoskey/bevy that referenced this issue Jan 6, 2025
# Objective

- First step for bevyengine#16718 
- bevyengine#16589 introduced an api that can only ignore errors, which is risky

## Solution

- Panic instead of just ignoring the errors

## Testing

- Changed the `fallible_systems` example to return an error
```
Encountered an error in system `fallible_systems::setup`: TooManyVertices { subdivisions: 300, number_of_resulting_points: 906012 }
Encountered a panic in system `fallible_systems::setup`!
Encountered a panic in system `bevy_app::main_schedule::Main::run_main`!
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events C-Usability A targeted quality-of-life change that makes Bevy easier to use S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it!
Projects
None yet
Development

No branches or pull requests

1 participant