Commit 20dccf52 authored by Arnaud Fontaine's avatar Arnaud Fontaine

ZODB Components: LOG traceback when import from FS fails.

parent 448eea34
......@@ -6346,6 +6346,13 @@ Business Template is a set of definitions, such as skins, portal types and categ
version,
erase_existing=erase_existing)
except Exception, e:
import traceback
LOG("BusinessTemplate", WARNING,
"Could not import component '%s' ('%s') from the filesystem: %s" %
(temp_obj.getReference(),
temp_obj.getSourceReference(),
traceback.format_exc()))
failed_import_dict[temp_obj.getReference()] = str(e)
else:
portal_type = obj.getPortalType()
......
  • LOG takes and error argument, which can either be an exc_info triplet, or, when the exception to log is the most recent one raised, just True.

  • Good to know. Thanks for pointing this out. I have just pushed a commit in my branch using error argument.

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