16 lines
361 B
Python
16 lines
361 B
Python
from backend import LrcException
|
|
|
|
|
|
def exception_decorator(*exceptions):
|
|
def decorator(func):
|
|
def new_func(*args, **kwargs):
|
|
try:
|
|
ret = func(*args, **kwargs)
|
|
return ret
|
|
except exceptions as e:
|
|
raise LrcException(e)
|
|
|
|
return new_func
|
|
|
|
return decorator
|