[Zope-Checkins] SVN: Zope/trunk/ - Collector #1751: Improved error reporting reporting during the

Andreas Jung andreas at andreas-jung.com
Fri Apr 29 06:27:37 EDT 2005


Log message for revision 30219:
  - Collector #1751: Improved error reporting reporting during the 
  startup phase
  

Changed:
  U   Zope/trunk/doc/CHANGES.txt
  U   Zope/trunk/lib/python/Zope2/Startup/datatypes.py

-=-
Modified: Zope/trunk/doc/CHANGES.txt
===================================================================
--- Zope/trunk/doc/CHANGES.txt	2005-04-29 10:01:19 UTC (rev 30218)
+++ Zope/trunk/doc/CHANGES.txt	2005-04-29 10:27:37 UTC (rev 30219)
@@ -31,7 +31,10 @@
   
       - Collector #1233: ported ZOPE_CONFIG patch from Zope 2.7 to Zope 2.8
 
+      - Collector #1751: Improved error reporting reporting during the 
+        startup phase
 
+
   Zope 2.8b1 (2005/04/24)
 
     Features added

Modified: Zope/trunk/lib/python/Zope2/Startup/datatypes.py
===================================================================
--- Zope/trunk/lib/python/Zope2/Startup/datatypes.py	2005-04-29 10:01:19 UTC (rev 30218)
+++ Zope/trunk/lib/python/Zope2/Startup/datatypes.py	2005-04-29 10:27:37 UTC (rev 30219)
@@ -93,9 +93,13 @@
                 package = __import__(n, g, g, component)
         return package
     except ImportError:
-        raise ValueError, (
-            'The object named by "%s" could not be imported' %  name )
 
+        import traceback, cStringIO
+        IO = cStringIO.StringIO()
+        traceback.print_exc(file=IO)
+        raise ValueError(
+            'The object named by "%s" could not be imported\n%s' %  (name, IO.getvalue()))
+
 # A datatype that ensures that a dotted path name can be resolved but
 # returns the name instead of the object
 



More information about the Zope-Checkins mailing list