-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
Allow app.select
to not abort on error
#13735
Comments
I'd say that we should align it with the So if we supply I believe this is better than having to coordinate the two behaviors in several places (imagine using What do you think? |
Yes I think this is better. |
and for completeness, I'd say that we should support the same for |
Let's track this here #14113 |
Is there an existing issue that is already proposing this?
Is your feature request related to a problem? Please describe it
When using
app.select
to get a module than have been loaded dynamically if the module is not found the app will crash and it's not possible to catch the error to prevent the crash.Describe the solution you'd like
Add a new boolean arg
abortOnError
toapp.select
that allow to not "abort on error" and catch the error.By default
abortOnError
will betrue
to keep the current behavior.Cf this issue for more details: #13033
Teachability, documentation, adoption, migration strategy
Users can pass the new arg to false to disable the "abort" behavior.
With
true
as default value there are no retro compatibility problems.What is the motivation / use case for changing the behavior?
I have some modules that are loaded dynamically based on different parameters/conditions.
But some modules will need some specific operations. So I select a module, if it's loaded I will run the specific operations, if it's not I will ignore it and do nothing.
Right now if the module is not loaded the app crash.
The text was updated successfully, but these errors were encountered: