News Feed
Sections




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

Michelangelo van Dam's Blog:
Throwing and catching exceptions
October 14, 2008 @ 14:32:59

Michelangelo van Dam has written up a quick introductory post on his blog about the process around throwing and catching exceptions in your apps.

One thing that I noticed was that although the code was well written [in the Zend Framework], implementing coding standards and best practices on many of the classes, I did notice a wrong usage of throwing exceptions (the try - catch statements).

He gives a few examples - catching a "divide by zero" the right and wrong way, how to grab/handle the message that comes along with the exception and how to define your own custom exception handler to help your code do more useful things with the errors it might throw.

0 comments voice your opinion now!
throw catch exception introduction custom handler


blog comments powered by Disqus

Similar Posts

DevShed: Improving Exception Throwing when Auto Loading Classes in PHP 5

PHPMaster.com: Amazon DynamoDB: Store PHP Sessions with Load Balancer

SitePoint PHP Blog: How to Install PHP Extensions from Source

OpenShift Blog: Getting started with PHP, CodeIgniter, MongoDB, and the cloud (OpenShift)

Lukas Smith's Blog: MDB2 2.1.0 released


Community Events





Don't see your event here?
Let us know!


language series deployment interview release install symfony opinion api framework bugfix laravel voicesoftheelephpant introduction tips community library package list podcast

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework