cubicweb/server/sources/native.py
changeset 12842 e150ed316dfc
parent 12782 ea8801f10a72
child 12883 d5bbf030f967
equal deleted inserted replaced
12841:fceae84a22dd 12842:e150ed316dfc
   715                 try:
   715                 try:
   716                     cnx.cnxset.rollback()
   716                     cnx.cnxset.rollback()
   717                     query_debug_informations["rollback"] = True
   717                     query_debug_informations["rollback"] = True
   718                     if self.repo.config.mode != 'test':
   718                     if self.repo.config.mode != 'test':
   719                         self.debug('transaction has been rolled back')
   719                         self.debug('transaction has been rolled back')
   720                 except Exception:
   720                 except Exception as rollback_exc:
   721                     pass
   721                     self.warning('exception raised and ignored during rollback %s:\n%s',
       
   722                                  rollback_exc, traceback.format_exc(limit=2))
   722             if any(cls.__name__ for cls in ex.__class__.__mro__
   723             if any(cls.__name__ for cls in ex.__class__.__mro__
   723                    if cls.__name__ == 'IntegrityError'):
   724                    if cls.__name__ == 'IntegrityError'):
   724                 # need string comparison because of various backends
   725                 # need string comparison because of various backends
   725                 for arg in ex.args:
   726                 for arg in ex.args:
   726                     # postgres, sqlserver
   727                     # postgres, sqlserver