PHP Classes

elegant - but dont create an object you dont use (thrf.

Recommend this page to a friend!

      Package Exception Error  >  All threads  >  elegant - but dont create an object...  >  (Un) Subscribe thread alerts  
Subject:elegant - but dont create an object...
Summary:Package rating comment
Messages:2
Author:Michael Burgess
Date:2007-11-02 12:29:21
Update:2007-11-02 12:47:56
 

Michael Burgess rated this package as follows:

Utility: Good
Consistency: Good
Unit tests: Sufficient

  1. elegant - but dont create an object...   Reply   Report abuse  
Picture of Michael Burgess Michael Burgess - 2007-11-02 12:29:22
elegant - but dont create an object you dont use (thrf. need)

  2. Re: elegant - but dont create an object...   Reply   Report abuse  
Picture of Johan Barbier Johan Barbier - 2007-11-02 12:47:56 - In reply to message 1 from Michael Burgess
Hi,

thanks:-)

Well, I don't : you can call exceptionErrorHandler dynamically, right (could be useful if you want to implement new stuff into in), or statically. Then this one's not created.
The specific exception objects need to be created, though, and, too, I left the possibility to any dev to implement new specific methods if he needs too, either in the parent exceptionErrorGeneric, or in each of its child.

And finally, I want to catch specifically the children, because it allows me to do, for example :
try {
// some error here
} catch(exceptionErrorUserNotice $e) {
// specific process for E_USER_NOTICE
} catch(exceptionErrorUserWarning $e) {
// specific process for E_USER_WARNING
}

and so on.