[Zope3-checkins] CVS: Zope3/src/zope/app/browser/cache - cacheable.py:1.3

Jim Fulton jim@zope.com
Thu, 9 Jan 2003 09:13:32 -0500


Update of /cvs-repository/Zope3/src/zope/app/browser/cache
In directory cvs.zope.org:/tmp/cvs-serv14386/src/zope/app/browser/cache

Modified Files:
	cacheable.py 
Log Message:
- Got rid of (essentially) unused validateMapping, validateMappingAll,
  ValidationErrorsAll and ConversionErrorsAll.

- Renamed zope.app.interfaces.forms to zope.app.interfaces.form

- Changed the way form input errors are handled. Now, *only*
  validation errors and widget input errors are caught and displayed
  on forms. These errors are about data entry problems. For these, it
  never makes sense to show a traceback.

  For Python programming errors, we want tracebacks, so it's important
  to handle them differently, but letting the propigate and get logged
  by the error reporting service.

  This required updating the widget code to be more careful about
  errors raised.



=== Zope3/src/zope/app/browser/cache/cacheable.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/browser/cache/cacheable.py:1.2	Wed Dec 25 09:12:28 2002
+++ Zope3/src/zope/app/browser/cache/cacheable.py	Thu Jan  9 09:12:58 2003
@@ -19,8 +19,7 @@
 from zope.component import getService, getAdapter
 from zope.proxy.context import ContextWrapper
 from zope.publisher.browser import BrowserView
-from zope.schema.interfaces import StopValidation, ValidationError, \
-     ValidationErrorsAll, ConversionErrorsAll
+from zope.schema.interfaces import StopValidation, ValidationError
 
 from zope.app.browser.form.widget import Widget
 from zope.app.cache.caching import getCacheForObj, getLocationForCache
@@ -28,7 +27,7 @@
 from zope.app.form.widget import CustomWidget
 from zope.app.interfaces.annotation import IAnnotatable
 from zope.app.interfaces.cache.cache import ICacheable
-from zope.app.interfaces.forms import WidgetInputError
+from zope.app.interfaces.form import WidgetInputError
 from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
 
 
@@ -58,8 +57,6 @@
         "Change the cacheId"
         try:
             cacheId = self.cacheId.getData()
-        except (ValidationErrorsAll, ConversionErrorsAll), e:
-            return self.form(errors=e)
         except WidgetInputError, e:
             #return self.form(errors=e.errors)
             return repr(e.errors)