(*args, **kwargs)
| 212 | def decorator(func): |
| 213 | @functools.wraps(func) |
| 214 | def wrapper(*args, **kwargs): |
| 215 | try: |
| 216 | return func(*args, **kwargs) |
| 217 | except exc_classes as e: |
| 218 | if len(args) >= 1 and getattr(args[0], "__class__", None): |
| 219 | func_name = "%s.%s" % (args[0].__class__.__name__, func.__name__) |
| 220 | else: |
| 221 | func_name = func.__name__ |
| 222 | |
| 223 | message = 'Exception in fuction "%s": %s' % (func_name, str(e)) |
| 224 | logger.log(level, message) |
| 225 | |
| 226 | return wrapper |
| 227 |
nothing calls this directly
no outgoing calls
no test coverage detected