Built-in commands should return Results whenever possible #17271
Labels
A-ECS
Entities, components, systems, and events
D-Straightforward
Simple bug fixes and API improvements, docs, test and examples
S-Ready-For-Implementation
This issue is ready for an implementation PR. Go for it!
X-Blessed
Has a large architectural impact or tradeoffs, but the design has been endorsed by decision makers
Milestone
First: I'll note that most of the built in commands as phrased in #17043 do not (yet) return errors, and I think updating everything is out of scope for this PR.
That being said, multiple paths have been laid for built-in commands to return handled errors.
The first path: all built-in commands are now exported as functions in the
command
andentity_command
modules. If any of them were rephrased to return an error, then this would immediately be possible:The more common case of using the built-in shorthand functions would use the default global error handler, which defaults to panicking but can be configured:
Originally posted by @cart in #17215 (comment)
The text was updated successfully, but these errors were encountered: