Exception Handling In PHP5- php tutorial

Written by Gertjan on February 16th, 2009

What is Exception Handling?

An exception (or exception handler) is a programming language construct that lets web developers have a better control over error handling. Most web sites development services have the option to extend this with their own custom exceptions to trap specific bugs or errors.

Exception Handling in PHP

PHP 5 has features for dealing with errors, thanks to its Object Oriented capabilities. Now, there is no need for explicit error checks every time one connects the database. There is more scope for controlling errors by using the exception class with try and catch blocks.

The exception handling procedure is very similar to the one used in JAVA and .Net programming. Any web sites development company implementing such programming languages can easily take advantages of error handling techniques. But, it is very important to include an error handler function for calling a function when the error occurs. Using the set_error_handler () easily solves this problem. It throws a new instance of the exception class and thus shows an error message and code as its arguments.

Tutorials about error handling in PHP 5:

Link 1: Error Handling in PHP: Introducing Exceptions in PHP 5
Link 2: Exception Handling In PHP5 – Good Cop, Bad Cop
Link 3: PHP Exception Handling

Tags: , ,

Related Posts:

3 Responses to “Exception Handling In PHP5- php tutorial”

  1. Hulk Smith Says:

    This is getting a bit more subjective, but I much prefer the Zune Marketplace. The interface is colorful, has more flair, and some cool features like ‘Mixview’ that let you quickly see related albums, songs, or other users related to what you’re listening to. Clicking on one of those will center on that item, and another set of “neighbors” will come into view, allowing you to navigate around exploring by similar artists, songs, or users. Speaking of users, the Zune “Social” is also great fun, letting you find others with shared tastes and becoming friends with them. You then can listen to a playlist created based on an amalgamation of what all your friends are listening to, which is also enjoyable. Those concerned with privacy will be relieved to know you can prevent the public from seeing your personal listening habits if you so choose.

  2. Test Blast Says:

    Test cdacb Blasts are Fun

  3. Seminars Says:

    I cherished up to you will receive carried out right here. The sketch is tasteful, your authored material stylish. nonetheless, you command get got an shakiness over that you would like be handing over the following. sick for sure come further previously once more since precisely the same just about very frequently inside case you shield this hike.

Leave a Reply