remove the internal_exception.ExceptionWrapper class

This commit is contained in:
shaun 2016-11-22 23:05:16 +11:00
parent 4aef5d7551
commit 615e541513
8 changed files with 41 additions and 49 deletions

View file

@ -15,7 +15,6 @@ import downloadutils
import read_embyserver as embyserver
from ga_client import GoogleAnalytics
from utils import window, settings, dialog, language as lang, should_stop
import internal_exceptions
##################################################################################################
@ -30,14 +29,12 @@ def catch_except(errors=(Exception, ), default_value=False):
def wrapper(*args, **kwargs):
try:
return func(*args, **kwargs)
except internal_exceptions.ExceptionWrapper as error:
log.exception(error)
raise
except sqlite3.Error as error:
raise
except errors as error:
errStrings = ga.formatException()
ga.sendEventData("Exception", errStrings[0], errStrings[1], True)
if not (hasattr(error, 'quiet') and error.quiet):
errStrings = ga.formatException()
ga.sendEventData("Exception", errStrings[0], errStrings[1], True)
log.exception(error)
log.error("function: %s \n args: %s \n kwargs: %s",
func.__name__, args, kwargs)