Skip to content
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

Wrap getAndVerifyCommand in try catch block #53

Merged
merged 3 commits into from
Nov 20, 2024

Conversation

ll-nick
Copy link
Collaborator

@ll-nick ll-nick commented Oct 7, 2024

This adds the ability to automatically fall back to the next best option if the getCommand() function of a behavior throws an exception.

Closes #21.

@ll-nick ll-nick requested a review from orzechow October 7, 2024 13:33
@ll-nick ll-nick self-assigned this Oct 7, 2024
@ll-nick ll-nick added enhancement New feature or request core library Concerns the project's core library labels Oct 7, 2024
Copy link
Member

@orzechow orzechow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great!
I've set the verification result to not Ok, after a catch – such that it's visible as failed state in the GUI as well (no distinction between exception and verification failure though).

Tested with the tutorial 😎

@orzechow orzechow mentioned this pull request Nov 19, 2024
@ll-nick
Copy link
Collaborator Author

ll-nick commented Nov 20, 2024

Nice addition with the verificationResult, thanks!

@ll-nick ll-nick merged commit 6bd3d29 into main Nov 20, 2024
1 check passed
@ll-nick ll-nick deleted the handle_behavior_exceptions branch November 20, 2024 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core library Concerns the project's core library enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrap getCommand in try-catch-block
2 participants