Classes | Functions | Variables
grpc.framework.foundation.callable_util Namespace Reference

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__)
 

Function Documentation

◆ _call_logging_exceptions()

def grpc.framework.foundation.callable_util._call_logging_exceptions (   behavior,
  message,
args,
**  kwargs 
)
private

Definition at line 53 of file callable_util.py.

◆ call_logging_exceptions()

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.

◆ with_exceptions_logged()

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.

Variable Documentation

◆ _LOGGER

grpc.framework.foundation.callable_util._LOGGER = logging.getLogger(__name__)
private

Definition at line 24 of file callable_util.py.



grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:32