bevyengine / bevyengine/bevy

Allow `FallbackErrorHandler` to send `AppExit`

Open
#24,821 1 comment 0 reactions 0 assignees View on GitHub
A-ECS C-Feature D-Modest S-Ready-For-Implementation X-Contentious
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## What problem does this solve or what need does it fill?

Cannot exit app without panic when error occurs.

I'm developing game server and need to keep server running.

## What solution would you like?

```rust
pub type ErrorHandler = fn(BevyError, ErrorContext); /// change to-> pub type ErrorHandler = fn(BevyError, ErrorContext, MessageWriter);

#[derive(Resource, Deref, DerefMut, Copy, Clone)]
pub struct FallbackErrorHandler(pub ErrorHandler);
```

## What alternative(s) have you considered?

```rust
pub type ErrorHandler = fn(BevyError, ErrorContext); /// change to-> pub type ErrorHandler = fn(BevyError, ErrorContext) -> Option;

#[derive(Resource, Deref, DerefMut, Copy, Clone)]
pub struct FallbackErrorHandler(pub ErrorHandler);
```

Contributor guide

Open the contributing guide

Research direction

Locate FallbackErrorHandler, ErrorHandler, BevyError, ErrorContext, and AppExit in the repository, then read the surrounding error-handling and application-exit code. Compare the requested callback signatures and determine how AppExit should be delivered without forcing a panic; done means the fallback handler supports the requested exit behavior while allowing the game server to keep running when appropriate.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
game-dev
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.