Skip to content

Add BevyError::new to explicitly construct a BevyError with a Severity#23690

Closed
alice-i-cecile wants to merge 1 commit intobevyengine:mainfrom
alice-i-cecile:bevy_error_constructor
Closed

Add BevyError::new to explicitly construct a BevyError with a Severity#23690
alice-i-cecile wants to merge 1 commit intobevyengine:mainfrom
alice-i-cecile:bevy_error_constructor

Conversation

@alice-i-cecile
Copy link
Copy Markdown
Member

@alice-i-cecile alice-i-cecile commented Apr 6, 2026

Objective

It should be easier to construct a BevyError with a given error severity.

Several options exist, but a simple new helper method should definitely exist.

Fixes #23676.

Solution

  • Write the helper.
  • Write some docs, linking to other solutions.

Testing

  • Write some doc tests!

@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 X-Uncontroversial This work is generally agreed upon D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Apr 6, 2026
@github-project-automation github-project-automation bot moved this to Needs SME Triage in ECS Apr 6, 2026
@alice-i-cecile
Copy link
Copy Markdown
Member Author

alice-i-cecile commented Apr 6, 2026

@loreball I'll swap you reviews for #23684? We might want both in the end, but should crosslink them in the docs.

Sorry, I didn't see your PR until after I'd made this!

@alice-i-cecile alice-i-cecile added this to the 0.19 milestone Apr 6, 2026
@alice-i-cecile
Copy link
Copy Markdown
Member Author

Consolidating into #23684.

@github-project-automation github-project-automation bot moved this from Needs SME Triage to Done in ECS Apr 6, 2026
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 D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward X-Uncontroversial This work is generally agreed upon

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

An easy way to construct BevyError

1 participant