Changeset 6227 for main


Ignore:
Timestamp:
29 May 2011, 23:15:21 (14 years ago)
Author:
uli
Message:

Use and raise DuplicationError? where appropriate.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/university/certificatecontainer.py

    r6224 r6227  
    66from zope.component import queryUtility
    77from zope.interface import implementedBy
     8from waeup.sirp.interfaces import DuplicationError
    89from waeup.sirp.university.interfaces import (
    910    ICertificateContainer, ICertificate)
     
    2728                code=(certificate.code,certificate.code))
    2829            if len(entries) > 0:
    29                 raise ValueError('Certificate exists already elsewhere')
     30                raise DuplicationError(
     31                    'Certificate exists already elsewhere', entries)
    3032        else:
    3133            # No catalog, then this addition won't do harm to anything.
Note: See TracChangeset for help on using the changeset viewer.