Commit 904fe051 authored by Arnaud Fontaine's avatar Arnaud Fontaine

Re-raise the exception on setDefaultProperties failure and improve

logging of the error



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@39876 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 04a1e6a3
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
# #
############################################################################## ##############################################################################
import sys
import transaction import transaction
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
...@@ -185,14 +186,12 @@ class PropertySheetTool(BaseTool): ...@@ -185,14 +186,12 @@ class PropertySheetTool(BaseTool):
try: try:
setDefaultProperties(property_holder, portal=self.getPortalObject()) setDefaultProperties(property_holder, portal=self.getPortalObject())
except: except:
import traceback
LOG("Tool.PropertySheetTool", ERROR, LOG("Tool.PropertySheetTool", ERROR,
"Could not generate accessor holder class for %s (module=%s): %s" %\ "Could not generate accessor holder class for %s (module=%s)" % \
(property_sheet_id, (property_sheet_id, accessor_holder_module_name),
accessor_holder_module_name, error=sys.exc_info())
traceback.format_exc()))
return None raise
# Create the new accessor holder class and set its module properly # Create the new accessor holder class and set its module properly
accessor_holder_class = type(property_sheet_id, (object,), dict( accessor_holder_class = type(property_sheet_id, (object,), dict(
......
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