mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-05-05 08:58:47 +00:00
re thorw exception in wrapper
This commit is contained in:
parent
590c3ef4c3
commit
066ec81e16
3 changed files with 5 additions and 5 deletions
|
@ -22,7 +22,7 @@ ga = GoogleAnalytics()
|
|||
|
||||
##################################################################################################
|
||||
|
||||
def catch_except(errors=(Exception, ), default_value=False):
|
||||
def catch_except(errors=(Exception, )):
|
||||
# Will wrap method with try/except and print parameters for easier debugging
|
||||
def decorator(func):
|
||||
def wrapper(*args, **kwargs):
|
||||
|
@ -34,7 +34,7 @@ def catch_except(errors=(Exception, ), default_value=False):
|
|||
log.exception(error)
|
||||
log.error("function: %s \n args: %s \n kwargs: %s",
|
||||
func.__name__, args, kwargs)
|
||||
return default_value
|
||||
raise
|
||||
|
||||
return wrapper
|
||||
return decorator
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue