[FIX] core: remove extra exception log, redundant in P3
Reverts 2b1d3ff82d introduced in 10.0 via
It was relatively useful in Odoo 10.0 because in Python 2 the exception
was missing a root cause traceback. But Python 3 includes exception
chaining by default, so it comes for free.
See [PEP3134](https://legacy.python.org/dev/peps/pep-3134/)
On top of being redundant in P3, it can also break some testcases
by causing an extra ERROR log entry, even when the final exception is
expected and caught. So it's simpler to remove it.
closes odoo/odoo#31699
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
This commit is contained in:
committed by
Olivier Dony
parent
d2d7f57529
commit
8da3750cee
@@ -1038,7 +1038,6 @@ class BaseModel(MetaModel('DummyModel', (object,), {'_register': False})):
|
||||
except ValidationError as e:
|
||||
raise
|
||||
except Exception as e:
|
||||
_logger.exception('Exception while validating constraint')
|
||||
raise ValidationError("%s\n\n%s" % (_("Error while validating constraint"), tools.ustr(e)))
|
||||
|
||||
@api.model
|
||||
|
||||
Reference in New Issue
Block a user