[Zope3-checkins] SVN: Zope3/trunk/ I tried to address issue 348, but you simply cannot have the info you

Stephan Richter srichter at cosmos.phy.tufts.edu
Tue Mar 1 21:16:49 EST 2005


Log message for revision 29378:
  I tried to address issue 348, but you simply cannot have the info you 
  want. Jim explained that in a lengthy note in the code already. To 
  improve the situation, I prepended "ImportError:" to the error message.
  
  

Changed:
  U   Zope3/trunk/doc/CHANGES.txt
  U   Zope3/trunk/doc/TODO.txt
  U   Zope3/trunk/src/zope/configuration/config.py

-=-
Modified: Zope3/trunk/doc/CHANGES.txt
===================================================================
--- Zope3/trunk/doc/CHANGES.txt	2005-03-02 02:09:55 UTC (rev 29377)
+++ Zope3/trunk/doc/CHANGES.txt	2005-03-02 02:16:49 UTC (rev 29378)
@@ -495,6 +495,11 @@
 
     Bug Fixes
 
+      - Addressed issue #348: ZCML hides import errors 
+ 
+        I tried really hard to get a better error message, but it is not
+        possible, so I just prepended "ImportError:" to the error message.
+
       - Fixed issue #352: documentation for
         zope.app.form.interfaces.IInputWidget.validate is wrong
 

Modified: Zope3/trunk/doc/TODO.txt
===================================================================
--- Zope3/trunk/doc/TODO.txt	2005-03-02 02:09:55 UTC (rev 29377)
+++ Zope3/trunk/doc/TODO.txt	2005-03-02 02:16:49 UTC (rev 29378)
@@ -76,8 +76,6 @@
 
 * 319: Navigation with anonymous
 
-* 321: TraversalError after renaming or moving Sites with local services 
-
 * 332: Death to IContentContainer
 
 * 334: Failing RuntimeInfo tests 
@@ -90,16 +88,12 @@
 
 * 345: Using response.write should not involve unicode conversion
 
-* 348: ZCML hides import errors 
-
 * 356: Copy and Paste does not handle exceptions raised by __setitem__ 
 
 * 360: MultiSelectWidget configured for ISet but creates list
 
 * 369: DAV is hosed on the trunk
 
-* 370: ZCML: Second 'packages-includes' 
-
 * 371: OrderedMultiSelectWidget ignores setRenderedValue
 
 * 372: WidgetInputError.doc is broken

Modified: Zope3/trunk/src/zope/configuration/config.py
===================================================================
--- Zope3/trunk/src/zope/configuration/config.py	2005-03-02 02:09:55 UTC (rev 29377)
+++ Zope3/trunk/src/zope/configuration/config.py	2005-03-02 02:16:49 UTC (rev 29378)
@@ -107,10 +107,13 @@
         1
         >>> c.resolve('zope.interface') is zope.interface
         1
-        >>> c.resolve('zope.configuration.eek')
+
+        >>> c.resolve('zope.configuration.eek') #doctest: +NORMALIZE_WHITESPACE
         Traceback (most recent call last):
         ...
-        ConfigurationError: Module zope.configuration has no global eek
+        ConfigurationError:
+        ImportError: Module zope.configuration has no global eek
+
         >>> c.resolve('.config.ConfigurationContext')
         Traceback (most recent call last):
         ...
@@ -216,8 +219,8 @@
                     # so reraise the exception so as not to hide it.
                     raise
 
-                raise ConfigurationError("Module %s has no global %s"
-                                         % (mname, oname))
+                raise ConfigurationError(
+                    "ImportError: Module %s has no global %s" % (mname, oname))
 
     def path(self, filename):
         """



More information about the Zope3-Checkins mailing list