Skip to content

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

@jhwoodyatt

Description

@jhwoodyatt

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions