Back to index

plone3  3.1.7
exceptions.py
Go to the documentation of this file.
00001 ##############################################################################
00002 #
00003 # Copyright (c) 2004 Zope Corporation and Contributors. All Rights Reserved.
00004 #
00005 # This software is subject to the provisions of the Zope Public License,
00006 # Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
00007 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
00008 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00009 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
00010 # FOR A PARTICULAR PURPOSE.
00011 #
00012 ##############################################################################
00013 """ CMFDefault product exceptions.
00014 
00015 $Id: exceptions.py 70883 2006-10-22 17:59:47Z yuppie $
00016 """
00017 
00018 from zope.schema import ValidationError
00019 from zope.i18nmessageid import MessageFactory
00020 _ = MessageFactory('cmf_default')
00021 
00022 from AccessControl import ModuleSecurityInfo
00023 security = ModuleSecurityInfo('Products.CMFDefault.exceptions')
00024 
00025 security.declarePublic('AccessControl_Unauthorized')
00026 from Products.CMFCore.exceptions import AccessControl_Unauthorized
00027 
00028 security.declarePublic('BadRequest')
00029 from Products.CMFCore.exceptions import BadRequest
00030 
00031 security.declarePublic('CopyError')
00032 from Products.CMFCore.exceptions import CopyError
00033 
00034 security.declarePublic('ResourceLockedError')
00035 from Products.CMFCore.exceptions import ResourceLockedError
00036 
00037 security.declarePublic('WorkflowException')
00038 from Products.CMFCore.WorkflowCore import WorkflowException
00039 
00040 security.declarePublic('zExceptions_Unauthorized')
00041 from Products.CMFCore.exceptions import zExceptions_Unauthorized
00042 
00043 
00044 security.declarePublic('EditingConflict')
00045 class EditingConflict(Exception):
00046     """ Editing conflict error.
00047     """
00048 
00049 
00050 security.declarePublic('DiscussionNotAllowed')
00051 class DiscussionNotAllowed(Exception):
00052     """ Discussion not allowed error.
00053     """
00054 
00055 
00056 security.declarePublic('IllegalHTML')
00057 class IllegalHTML(ValueError):
00058     """ Illegal HTML error.
00059     """
00060 
00061 
00062 security.declarePublic('MetadataError')
00063 class MetadataError(Exception):
00064     """ Metadata error.
00065     """
00066 
00067 class EmailAddressInvalid(ValidationError):
00068     __doc__ = _(u'Invalid email address.')