Classes | |
| class | _EasyOutcome |
| class | Outcome |
Functions | |
| def | _call_logging_exceptions (behavior, message, *args, **kwargs) |
| def | call_logging_exceptions (behavior, message, *args, **kwargs) |
| def | with_exceptions_logged (behavior, message) |
Variables | |
| _LOGGER = logging.getLogger(__name__) | |
|
private |
Definition at line 53 of file callable_util.py.
| def grpc.framework.foundation.callable_util.call_logging_exceptions | ( | behavior, | |
| message, | |||
| * | args, | ||
| ** | kwargs | ||
| ) |
Calls a behavior in a try-except that logs any exceptions it raises. Args: behavior: Any callable. message: A string to log if the behavior raises an exception. *args: Positional arguments to pass to the given behavior. **kwargs: Keyword arguments to pass to the given behavior. Returns: An Outcome describing whether the given behavior returned a value or raised an exception.
Definition at line 83 of file callable_util.py.
| def grpc.framework.foundation.callable_util.with_exceptions_logged | ( | behavior, | |
| message | |||
| ) |
Wraps a callable in a try-except that logs any exceptions it raises. Args: behavior: Any callable. message: A string to log if the behavior raises an exception. Returns: A callable that when executed invokes the given behavior. The returned callable takes the same arguments as the given behavior but returns a future.Outcome describing whether the given behavior returned a value or raised an exception.
Definition at line 62 of file callable_util.py.
|
private |
Definition at line 24 of file callable_util.py.