(func)
return FormatErrorsWrap
Decorator to format exceptions if they get raised.
Decorator to format exceptions if they get raised.
Decorator to format exceptions if they get raised .
def FormatErrorsDec(func):
  """Decorator to format exceptions if they get raised."""

  def FormatErrorsWrap(context):
    try:
      return func(context)
    except Exception as e:
      raise Error(FormatException(e.message))

  return FormatErrorsWrap
def FormatErrorsDec ( func ) : def FormatErrorsWrap ( context ) : try : return func ( context ) except Exception as e : raise Error ( FormatException ( e . message ) ) return FormatErrorsWrap