[Zope-Coders] RFC: Death to string exceptions
Paul Winkler
pw_lists at slinkp.com
Mon Nov 17 11:47:46 EST 2003
On Mon, Nov 17, 2003 at 10:27:48AM -0500, Tres Seaver wrote:
> Can anyone thing of a good reason not to exterminate the use of string
> exceptions in the Zope core, both for the 2.7 branch and for the head?
> For instance, are there known (not hypothetical) products which rely on
> them deeply? There are several places where we raise "named" strings;
> clients who already use the names should be safe.
>
> Removing them will silence the majority of deprecation warnings which
> currently pollute the 'make test' output for 2.7.
FYI I grepped my installed Products for string exceptions,
and only found these:
CMFDefault/Document.py: except 'EditingConflict', msg:
CMFDynamicDocument1_1_11/DynamicDocument.py: except 'EditingConflict', msg:
CMFPlone/PloneFolder.py: except (Unauthorized, 'Unauthorized'):
CMFPlone/StatelessTree.py: except (Unauthorized, 'Unauthorized'):
CMFPlone/skins/plone_form_scripts/content_status_modify.cpy:except 'Unauthorized':
CMFPlone/skins/plone_form_scripts/content_status_modify.cpy: except 'Unauthorized':
CMFPlone/skins/plone_scripts/isExpired.py:except 'TimeError':
Formulator/Validator.py: except ('DateTimeError', 'Invalid Date Components', 'TimeError'):
GroupUserFolder/GroupsTool.py: except 'BadRequest':
LocalFS/LocalFS.py: except 'NotFound': pass
LocalFS/LocalFS.py: except 'NotFound': raise AttributeError, attr
LocalFS/LocalFS.py: except: raise 'Upload Error', MessageDialog(
LocalFS/LocalFS.py: except: raise 'Rename Error', MessageDialog(
LocalFS/LocalFS.py: except 'Forbidden': pass
NuxCPS/skins/folder_retitle.py: except 'Unauthorized': # Unauthorized, object must be locked
NuxWorkgroup/skins/workgroup_retitle.py: except 'Unauthorized': # Unauthorized, object must be
locked
mxmRelations/mxmRelations.py: except 'Unauthorized':
Not too bad considering my current product list (a few of these
are in-house products, most are third-party):
BTreeFolder
BTreeFolder2
CaseStudy
CMFActionIcons
CMFArticle
CMFCalendar
CMFCore
CMFDecor
CMFDefault
CMFDynamicDocument1_1_11
CMFFormController
CMFPlone
CMFQuickInstallerTool
CMFTopic
ContentProxy
CTILdapUser
CTIPortalData
DCWorkflow
DocumentLibrary
easyArticle
easyArticleList
ExternalEditor
Formulator
FSCacheManager
GroupUserFolder
LDAPUserFolder
LocalFS
Localizer
mxm
mxmRelations
NuxCPSDocuments
NuxCPSMembersPrivateArea
NuxCPSMessageCatalog
NuxCPSPreferences
NuxDocument
NuxMetaDirectories
NuxPortal
NuxWorkgroup
NuxCPS
NuxExtendedWorkflow
NuxHierarchies
NuxUserGroups
OrderedFolderSupportPatch
PortalContentFolder
RelationAwareFolder
VersionManager
WorkflowSchema
ZSyncer
--
Paul Winkler
http://www.slinkp.com
Look! Up in the sky! It's THE RADIOISOTOPIC RAPIST!
(random hero from isometric.spaceninja.com)
More information about the Zope-Coders
mailing list