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

Feature request: a convenient method to raise Failure with a logged message #51

Open
jhwoodyatt opened this issue Sep 24, 2023 · 0 comments

Comments

@jhwoodyatt
Copy link
Sponsor

jhwoodyatt commented Sep 24, 2023

A convenient feature in the Google Logging Library is the FATAL severity level. Please consider adding something to this library with a similar functionality, i.e. something that logs a message to all reporters, then raises Failure with the reported message.

Likewise, something with the same basic behavior but raises Invalid_argument instead of Failure may also be a convenience.

Note: I'm not asking for a new severity level in this library, recognizing that it may or may not be a useful distinction. Just a way to combine logging a message and raising an exception that contains the message.

Note: the Google Logging Library also offers CHECK macros, which are conceptually similar to assert with logging. A similar convenience here might also be worth considering.

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

No branches or pull requests

1 participant