Log exception that are not 'UserError', 'ConcurrencyException' nor 'NotLogged'
This commit is contained in:
+2
-1
@@ -46,7 +46,8 @@ class OSVService(Service):
|
||||
res = getattr(obj, method)(cursor, user, *args, **kargs)
|
||||
return res
|
||||
except Exception, exception:
|
||||
if CONFIG['verbose']:
|
||||
if CONFIG['verbose'] or str(exception.args[0]) not in \
|
||||
('NotLogged', 'ConcurrencyException', 'UserError'):
|
||||
tb_s = reduce(lambda x, y: x+y,
|
||||
traceback.format_exception(*sys.exc_info()))
|
||||
logger = logging.getLogger("web-service")
|
||||
|
||||
@@ -56,7 +56,8 @@ class ReportService(Service):
|
||||
res = report.execute(cursor, user, ids, datas, context)
|
||||
return res
|
||||
except Exception, exception:
|
||||
if CONFIG['verbose']:
|
||||
if CONFIG['verbose'] or str(exception.args[0]) not in \
|
||||
('NotLogged', 'ConcurrencyException', 'UserError'):
|
||||
tb_s = reduce(lambda x, y: x+y,
|
||||
traceback.format_exception(*sys.exc_info()))
|
||||
logging.getLogger("web-service").error(
|
||||
|
||||
@@ -34,7 +34,8 @@ class WizardService(Service):
|
||||
res = wizard.execute(cursor, user, data, state, context)
|
||||
return res
|
||||
except Exception, exception:
|
||||
if CONFIG['verbose']:
|
||||
if CONFIG['verbose'] or str(exception.args[0]) not in \
|
||||
('NotLogged', 'ConcurrencyException', 'UserError'):
|
||||
tb_s = reduce(lambda x, y: x+y,
|
||||
traceback.format_exception(*sys.exc_info()))
|
||||
logging.getLogger("web-service").error(
|
||||
|
||||
Reference in New Issue
Block a user