[IMP] log exceptions as exceptions

bzr revid: chs@openerp.com-20120822101117-qoahu73ix8fcmcim
This commit is contained in:
Christophe Simonis 2012-08-22 12:11:17 +02:00
parent d0057766ab
commit 16dc736b23
1 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@
############################################################################## ##############################################################################
# #
# OpenERP, Open Source Management Solution # OpenERP, Open Source Management Solution
# Copyright (C) 2004-2011 OpenERP SA (<http://www.openerp.com>) # Copyright (C) 2004-2012 OpenERP SA (<http://www.openerp.com>)
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as # it under the terms of the GNU Affero General Public License as
@ -376,11 +376,11 @@ def dispatch_rpc(service_name, method, params):
except openerp.exceptions.Warning: except openerp.exceptions.Warning:
raise raise
except openerp.exceptions.DeferredException, e: except openerp.exceptions.DeferredException, e:
_logger.error(tools.exception_to_unicode(e)) _logger.exception(tools.exception_to_unicode(e))
post_mortem(e.traceback) post_mortem(e.traceback)
raise raise
except Exception, e: except Exception, e:
_logger.error(tools.exception_to_unicode(e)) _logger.exception(tools.exception_to_unicode(e))
post_mortem(sys.exc_info()) post_mortem(sys.exc_info())
raise raise