News Feed
Sections




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

NetTuts.com:
The Ins and Outs of PHP Exceptions
October 14, 2011 @ 08:44:32

On NetTuts.com today there's a new tutorial showing you the "ins and outs" of using exceptions in PHP - throwing them, handling the result and integrating them into your error handling process.

Still returning false whenever a function in your program fails? In this article, we'll learn about PHP exceptions, and how you can use them to soup up your application's error handling.

The include some of the methods you can call on your exceptions (including getting the message, code, file, line and the results of a debug_backtrace right before it was thrown). Included is code to throw exceptions, catch them with a try/catch and using error codes as return values and extending them to fit your own needs.

0 comments voice your opinion now!
exception handling throw tutorial extend example


blog comments powered by Disqus

Similar Posts

SpinDrop.us: Using Zend Search Lucene in a symfony app

Kenny Katzgrau's Blog: Enable Site-Wide Profiling With CodeIgniter

PHPBuilder.com: Use PDO to Access Just About Any Database from PHP

Justin Carmony's Blog: Setting Up Nginx & PHP-FPM on Ubuntu 10.04

NETTUTS.com: How to Authenticate Users With Facebook Connect


Community Events





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


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

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