Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Matthew Weir O'Phinney's Blog:
Notes on PEAR_Exception
Jul 07, 2005 @ 11:21:31

On Matthew Weir O'Phinney's weblog today, there's a new post with his look at PEAR_Exception:

I've been doing some thinking on exceptions, and PEAR_Exception in particular. You may want to skip ahead to read about how to use PEAR_Exception, as well as some of my thoughts on the class on first use. If you want the background, read on.

I've created a package proposal on PEAR for a package called File_Fortune, an OOP interface to reading and writing fortune files. [...] The first comment I got on the proposal was the question: "Why PHP5?" [...] Well, then some chatter happened, and a number of developers said, "Why not PHP5?" So, I went back to PHP5. And then somebody else said, "Use PEAR_Exception." So, I started playing with that, and we finally get to the subject of this post.

He spends the rest of the post talking about PEAR_Exception and the difficulties that he had with it - poor documentation, little help from the lists, etc. He also gives a small example of how to use the class to catch an error in your app...

tagged:

Link:


Trending Topics: