Commit e7010195 authored by Jérome Perrin's avatar Jérome Perrin

log the exception when importing local document or property sheet fails


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4078 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 85fb81fb
...@@ -44,7 +44,7 @@ from Products.ERP5Type import Constraint ...@@ -44,7 +44,7 @@ from Products.ERP5Type import Constraint
from Products.ERP5Type import Interface from Products.ERP5Type import Interface
from Products.ERP5Type import PropertySheet from Products.ERP5Type import PropertySheet
from zLOG import LOG from zLOG import LOG, PROBLEM
##################################################### #####################################################
# Global Switches # Global Switches
...@@ -661,11 +661,11 @@ def initializeLocalDocumentRegistry(): ...@@ -661,11 +661,11 @@ def initializeLocalDocumentRegistry():
module_name = file_name[0:-3] module_name = file_name[0:-3]
try: try:
importLocalDocument(module_name, document_path = document_path) importLocalDocument(module_name, document_path = document_path)
LOG('Added local document to ERP5Type repository: %s (%s)' % (module_name, document_path),0,'') LOG('Added local document to ERP5Type repository: %s (%s)'
#print 'Added local document to ERP5Type repository: %s (%s)' % (module_name, document_path) % (module_name, document_path), 0, '')
except: except Exception, e:
LOG('Failed to add local document to ERP5Type repository: %s (%s)' % (module_name, document_path),0,'') LOG('Failed to add local document to ERP5Type repository: %s (%s)'
#print 'Failed to add local document to ERP5Type repository: %s (%s)' % (module_name, document_path) % (module_name, document_path), PROBLEM, '', e)
def initializeLocalPropertySheetRegistry(): def initializeLocalPropertySheetRegistry():
if not getConfiguration: return if not getConfiguration: return
...@@ -683,11 +683,11 @@ def initializeLocalPropertySheetRegistry(): ...@@ -683,11 +683,11 @@ def initializeLocalPropertySheetRegistry():
module_name = file_name[0:-3] module_name = file_name[0:-3]
try: try:
importLocalPropertySheet(module_name, path = document_path) importLocalPropertySheet(module_name, path = document_path)
LOG('Added local property sheet to ERP5Type repository: %s (%s)' % (module_name, document_path),0,'') LOG('Added local property sheet to ERP5Type repository: %s (%s)'
#print 'Added local property sheet to ERP5Type repository: %s (%s)' % (module_name, document_path) % (module_name, document_path), 0, '')
except: except Exception, e:
LOG('Failed to add local property sheet to ERP5Type repository: %s (%s)' % (module_name, document_path),0,'') LOG('Failed to add local property sheet to ERP5Type repository: %s (%s)'
#print 'Failed to add local property sheet to ERP5Type repository: %s (%s)' % (module_name, document_path) % (module_name, document_path), PROBLEM, '', e)
##################################################### #####################################################
# Product initialization # Product initialization
......
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