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

Print proper error messages if there is an error. #839

Merged
merged 1 commit into from
Dec 21, 2022

Conversation

autoantwort
Copy link
Contributor

Copy link
Member

@vicroms vicroms left a comment

Choose a reason for hiding this comment

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

I think these changes are OK. We may want to discuss if it is acceptable to leave fatal errors unlocalized.

@autoantwort
Copy link
Contributor Author

Yeah my assumption is that check_exit is used to check invariants and they should never be violated. So localizing text that is never displayed seems unnecessary.

@ras0219-msft
Copy link
Contributor

Your assumption is correct -- however it turns out that this code is incorrectly using check_exit(). Since we are now going to use these functions as post-built lint checks, running on user-generated files, they need to handle invalid data without crashing. That means all the functions need to be changed over to ExpectedL<>s with localized errors.

That said this is a fine improvement in the meantime. Thanks!

@ras0219-msft ras0219-msft merged commit ab76711 into microsoft:main Dec 21, 2022
@autoantwort autoantwort deleted the feature/error-messages branch January 11, 2023 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants