-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
core: catch command handler errors #5894
Conversation
033fdc3
to
8e30373
Compare
It works really well! I was able to test by throwing errors for a command on both It also fixes the issue #827 👍 |
@marechal-p please see #5898 You should fix and handle |
8e30373
to
3098b10
Compare
If a contribution throws an error during basic lifecycle steps, it might kill whatever is trying to iterate over all the contributions. A better strategy would be to catch errorred handlers and keep looking for other contributions. Also fix `.getToggledHandler` to not stop prematurely and actually test if the handler is toggled or not. Signed-off-by: Paul Maréchal <[email protected]>
3098b10
to
3d28b10
Compare
Fixed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code looks good time
@vince-fugnitto could you give it a go please and if you are fine, let's merge
It still works correctly on my end :) |
What it does
fix #5898 - catches command handler errors.
Also fix bug where
getToggledHandler
would stop on the first handler with aisToggled
function defined, without executing it.How to test
Modify some command handler to throw errors, without this patch it can prevent the command palette from opening. With this change, the error will be reported but it will not stop the processing of other contributions.
Review checklist
Reminder for reviewers