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 @@
#
##############################################################################
import sys
import transaction
from AccessControl import ClassSecurityInfo
......@@ -185,14 +186,12 @@ class PropertySheetTool(BaseTool):
try:
setDefaultProperties(property_holder, portal=self.getPortalObject())
except:
import traceback
LOG("Tool.PropertySheetTool", ERROR,
"Could not generate accessor holder class for %s (module=%s): %s" %\
(property_sheet_id,
accessor_holder_module_name,
traceback.format_exc()))
"Could not generate accessor holder class for %s (module=%s)" % \
(property_sheet_id, accessor_holder_module_name),
error=sys.exc_info())
return None
raise
# Create the new accessor holder class and set its module properly
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