Commit a76f0528 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Log a message if an exception happens.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@978 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b104e7cb
...@@ -304,7 +304,7 @@ class Catalog(Persistent, Acquisition.Implicit, ExtensionClass.Base): ...@@ -304,7 +304,7 @@ class Catalog(Persistent, Acquisition.Implicit, ExtensionClass.Base):
insert_catalog_line = 1 insert_catalog_line = 1
else: else:
LOG('SQLCatalog WARNING',0,'assigning new uid to already catalogued object %s' % path) LOG('SQLCatalog WARNING',0,'assigning new uid to already catalogued object %s' % path)
uid = 0 uid = 0
insert_catalog_line = 0 insert_catalog_line = 0
if not uid: if not uid:
# Generate UID # Generate UID
...@@ -352,13 +352,16 @@ class Catalog(Persistent, Acquisition.Implicit, ExtensionClass.Base): ...@@ -352,13 +352,16 @@ class Catalog(Persistent, Acquisition.Implicit, ExtensionClass.Base):
kw['uid'] = index kw['uid'] = index
kw['insert_catalog_line'] = insert_catalog_line kw['insert_catalog_line'] = insert_catalog_line
# LOG # LOG
# LOG("Call SQL Method %s with args:" % method_name,0, str(kw))
# Alter row # Alter row
# Create row # Create row
zope_root = self.getPortalObject().aq_parent try:
root_indexable = int(getattr(zope_root,'isIndexable',1)) zope_root = self.getPortalObject().aq_parent
if root_indexable: root_indexable = int(getattr(zope_root,'isIndexable',1))
method(**kw) if root_indexable:
#LOG("Call SQL Method %s with args:" % method_name,0, str(kw))
method(**kw)
except:
LOG("SQLCatalog Warning: could not catalog object with method %s" % method_name,100, str(path))
#except: #except:
# # # This is a real LOG message # # # This is a real LOG message
# # # which is required in order to be able to import .zexp files # # # which is required in order to be able to import .zexp files
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment