parameters: (func)
return_statement: return _error_handler
docstring: Decorator that logs any exception in decorated function, then re-raises
docstring_summary: Decorator that logs any exception in decorated function, then re-raises
docstring_tokens: Decorator that logs any exception in decorated function then re - raises
function: def error_handler(func):
      """Decorator that logs any exception in decorated function, then re-raises"""
  
      @wraps(func)
      def _error_handler(*args, **kwargs):
          try:
              res = func(*args, **kwargs)
              return res
          except Exception as e:
              error("Exception %s occurred during %s", e, func.__name__, exc_info=True)
              raise
  
      return _error_handler
function_tokens: def error_handler ( func ) : @ wraps ( func ) def _error_handler ( * args , * * kwargs ) : try : res = func ( * args , * * kwargs ) return res except Exception as e : error ( "Exception %s occurred during %s" , e , func . __name__ , exc_info = True ) raise return _error_handler