On Nov 2, 2004, at 9:47 PM, Thilo Planz wrote:
For errors that occur in the run_mode itself, CGI::App has much improved recently by allowing an error_mode thatcan handle the exception.Unfortunately, this does not cover exceptions before or after the run_mode, such as in one of the hooks or callbacks.Maybe it could be modified to somehow use error_mode here as well.
True in a sense, but there are times (for instance with plugin callbacks) where you want to throw/catch an error and log it rather then stop all processing. I don't see a special error run mode helping much there. I also don't see it being helpful for returning the user to an existing runmode with the error message in tow.
Just like HTML templating, exception handling is a topic were everyone has his favourite methods and modules, so it is very unlikely thatwe can agree on something more elaborate than the plain die().
Ah, but not all pigs are created equal though. ;) HTML::Template is clearly the favorite however it can be readily replaced or ignored for those who feel differently. Since error handling (in the broadest sense) is equally as common in CGI app development and something we all must do, it's really a shame that its not more robust then die and eval for those who don't really have a preference and would appreciate having something more functional.
<tim/>
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/suppressed/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.