Re: PEAR_Error Integration...

From: Date: Sat, 31 May 2003 17:12:33 +0000
Subject: Re: PEAR_Error Integration...
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-16855@lists.php.net to get a copy of this message
Gabriel Da Silveira wrote:
Hey PEAR developers, I'm a new recruit and very excited about becoming a contributor. I've been working with PHP for about 2.5 years building and managing all aspects of a 400-page Web site. As the site grew, I became more and more bogged down in maintenance issues, and so about a year ago I started creating a robust templating system to make the site more manageable. The system is not strictly a templating system, but neither is it a content management system (although it offers a good framework for one). What really differentiates my system is that it leverages the file-system hierarchy and standard HTML elements (uses META tags for configuration and data) to offer a clean and flexible templating system that can be used on an entire site with a simple 3-line driver script and extremely minimal inherited configuration info. I am now converting it from my proprietary code into a reusable class that meets the PEAR coding standards and writing documentation. I will be posting a proposal hopefully by the end of June. Anyway, I had a few quick questions regarding PEAR errors. What are the intended benefits of using raiseError() or throwError() as opposed to instantiating PEAR_Errors directly? I can see that it checks expected errors and sets defaults, but is there more to it than that? Is there any reason NOT to use it? I'm curious because raiseError() is not in the documentation, and I only stumbled upon it by reading the mailing list. Also I'm curious about error codes. Does PEAR do anything other than just pass these codes around? Are there any conventions that we should use for these so they have some semblance of normalcy across various classes and don't require relearning for every new PEAR class we want to use? Thanks in advance for your responses. ________________ Gabe da Silveira Twin Cities Student Unions Web Manager http://www.coffman.umn.edu/ dasil003@umn.edu (612)624-7270
Hey, might want to check this out too: http://www.php-mag.net/itr/online_artikel/psecom,id,330,nodeid,114.html - Davey

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