Re: Using SPL Exceptions

From: Date: Thu, 21 Aug 2008 22:11:53 +0000
Subject: Re: Using SPL Exceptions
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-50610@lists.php.net to get a copy of this message
Michael Gauthier wrote:
What is PEAR's stance on using SPL exceptions in packages? Joe commented on this in my recent Payment_PayPal_Soap proposal [1] and I've brought it up on the list before [2]. [1] http://pear.php.net/pepr/pepr-comments-show.php?id=556 [2] http://marc.info/?l=pear-dev&m=120576904018620&w=2 We are currently working on a standard for this for pear2, but don't have any plans to update the standard for current pear code yet.
In general the idea is too reuse the spl exceptions when possible but still make things catchable per package. You can use this by have an exception interface for the package, since you can catch based on an interface. The new standard is http://wiki.pear.php.net/index.php/PEAR2_Exception_Policy but its not done yet. -josh

« previous php.pear.dev (#50610) next »