Log exception that are not 'UserError', 'ConcurrencyException' nor 'NotLogged'

This commit is contained in:
Cédric Krier
2008-11-27 15:49:01 +01:00
parent f3101c88fd
commit 0eb9fb4883
3 changed files with 6 additions and 3 deletions
+2 -1
View File
@@ -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")
+2 -1
View File
@@ -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(
+2 -1
View File
@@ -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(