Re: [PEPr] Comment on Authentication::Auth_MicroID
| From: | wilms at cs dot umn dot edu | Date: | Thu, 20 Mar 2008 17:44:01 +0000 |
| Subject: | Re: [PEPr] Comment on Authentication::Auth_MicroID | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-49474@lists.php.net to get a copy of this message | ||
All,
Thanks for the suggestions regarding the exceptions. However, because MicroID places no restrictions on the semantics of a given EntityURI, I believe it doesn't make sense to validate these URIs and throw exceptions. Thus, I am leaning towards only having a Auth_MircoID_AlgorithmNotFoundException exception.
Thoughts?
On Mar 14 2008, Ken Guest wrote:
4// Regarding the exception class; I agree with Michael and for this reason: If you name the exception class to something more specific it'll be possible for people using your module to write cleaner code for handling thrown exceptions based on the class name rather than checking an error code (which you would then have to define, document etc etc). So, picking up on what Philippe suggested, you might have: Auth_MircoID_AlgorithmNotFoundException Auth_MircoID_IdentityUriNotValidException Auth_MircoID_ServiceUriNotValidException I'd suggest using Validate::uri and possibly Validate::email to determine whether the given URIs are valid rather than duplicating code.