mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-12 21:26:10 +00:00
Catch exception for content being processed
This commit is contained in:
parent
090ff79e8f
commit
1149af84aa
1 changed files with 4 additions and 0 deletions
|
@ -12,11 +12,13 @@ import api
|
||||||
import artwork
|
import artwork
|
||||||
import downloadutils
|
import downloadutils
|
||||||
import read_embyserver as embyserver
|
import read_embyserver as embyserver
|
||||||
|
from ga_client import GoogleAnalytics
|
||||||
from utils import window, settings, dialog, language as lang, should_stop
|
from utils import window, settings, dialog, language as lang, should_stop
|
||||||
|
|
||||||
##################################################################################################
|
##################################################################################################
|
||||||
|
|
||||||
log = logging.getLogger("EMBY."+__name__)
|
log = logging.getLogger("EMBY."+__name__)
|
||||||
|
ga = GoogleAnalytics()
|
||||||
|
|
||||||
##################################################################################################
|
##################################################################################################
|
||||||
|
|
||||||
|
@ -27,6 +29,8 @@ def catch_except(errors=(Exception, ), default_value=False):
|
||||||
try:
|
try:
|
||||||
return func(*args, **kwargs)
|
return func(*args, **kwargs)
|
||||||
except errors as error:
|
except errors as error:
|
||||||
|
errStrings = ga.formatException()
|
||||||
|
ga.sendEventData("Exception", errStrings[0], errStrings[1])
|
||||||
log.exception(error)
|
log.exception(error)
|
||||||
log.error("function: %s \n args: %s \n kwargs: %s",
|
log.error("function: %s \n args: %s \n kwargs: %s",
|
||||||
func.__name__, args, kwargs)
|
func.__name__, args, kwargs)
|
||||||
|
|
Loading…
Reference in a new issue