re throw all DB errors

This commit is contained in:
shaun 2016-11-07 22:27:25 +11:00
parent 8704be627d
commit 61d8a66df6

View file

@ -29,9 +29,8 @@ def catch_except(errors=(Exception, ), default_value=False):
def wrapper(*args, **kwargs): def wrapper(*args, **kwargs):
try: try:
return func(*args, **kwargs) return func(*args, **kwargs)
except sqlite3.OperationalError as error: except sqlite3.Error as error:
if "database is locked" in error: raise
raise
except errors as error: except errors as error:
errStrings = ga.formatException() errStrings = ga.formatException()
ga.sendEventData("Exception", errStrings[0], errStrings[1], True) ga.sendEventData("Exception", errStrings[0], errStrings[1], True)