Skip to content

Allow FallbackErrorHandler to send AppExit #24821

Description

@kukuro-kt

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?

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

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

What alternative(s) have you considered?

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-FeatureA new feature, making something new possibleS-Needs-TriageThis issue needs to be labelled

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions