News Feed
Jobs Feed
Sections




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

Jani Hartikainen's Blog:
Exceptions and abstraction
August 16, 2010 @ 09:59:45

Jani Hartikainen has a few suggestions on how to handle exceptions in your application - more specifically how to handle them in your classes and still keep proper abstraction.

So you already know how to handle your errors properly. Even if you're already using exceptions, there are some nuances to the use of exceptions that are important to know and understand in order to write code that is easier to reuse and more decoupled. Let's talk about exceptions and how they relate to your classes and abstraction.

He looks at classes/abstraction, how they relate to normal and custom exceptions and how to design your code better to wrap exceptions in custom handlers to make maintainability even easier. He also suggests catching everything in more general exceptions as well, giving you an overall way to handle abstracted exceptions.

0 comments voice your opinion now!
exception abstraction class tutorial


blog comments powered by Disqus

Similar Posts

IBM developerWorks: Setting up your own on-demand video site with PHP, Part 1

Till Klampaeckel's Blog: Cooking PHPUnit (and a chef-solo example on top)

Cameron McKay: Counting Syllables and Detecting Rhyme in PHP

DZone.com: Zend Application demystified

IBM developerWorks: Developing PHP the Ajax way, Part 2 - Back, Forward, Reload


Community Events











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


composer package unittest database framework hack release performance introduction hhvm overview symfony2 language opinion podcast application install facebook component security

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