[Zope-dev] Deprecation Warning
Lennart Regebro
regebro at gmail.com
Wed Jul 23 10:14:07 EDT 2008
On Wed, Jul 23, 2008 at 14:03, vyshakh krishnan
<vyshakh.krishnan at gmail.com> wrote:
> Hi everybody,
>
>
> While porting Zope2 on Python2.5, I am now trying to remove the
> deprecation warnings.Most of them are due to the raising of string
> exceptions. One of such warnings in the module Products is
>
> /home/zope/ztrunk25/lib/python/OFS/SimpleItem.py:248:
> DeprecationWarning: raising a string exception is deprecated
> raise error_type, v, tb
>
> These warnings can be removed by changing these string exceptions to
> class based exceptions.
> Can anyone suggest how these changes can be made?
Well, typically you create classes based on Exception or
BaseException, and use them instead.
Maybe you could expand a bit on what your worries are?
--
Lennart Regebro: Zope and Plone consulting.
http://www.colliberty.com/
+33 661 58 14 64
More information about the Zope-Dev
mailing list