Handling errors

As coders, I'm sure we all know the value of good error handling. So I thought a quick post about how Codeigniter deals with those pesky errors would be a good post. The way I see it, there are 2 types of errors we have to work with. The ones which are displayed out in nice friendly text to your users, and the type which are hidden and shown only to you as the coder to figure out where something has gone wrong.

Related Tutorials
Error Handling
Every website will encounter errors from time to time. Most sites will not have any error handling in place and the visitor will most likely receive a cryptic programming error. This can turn visitors away as they don't know what is happening. The way around this is to provide some error handling in your scripts. By testing for errors at crucial stages (e.g accessing a database) you can provide a friendly error message for the user. This tutorial will show you how the error handling functions for the LATEdownload v2 script have been written and how you can use them in your own site.
Replace error reporting with exception handlers
As part of a series of posts about PHP exception handling, this post looks at how to make regular errors use exception model. Normally only the newer object-oriented extensions throw exceptions but it is possible to make all errors throw an exception instead using set_error_handler.
Error Handling
Every programmer wants to practice effective error handling. Learn how to control the size and other aspects of file uploading on your server by error handling.
PHP Debugging
Ok, so quite a lot of newbies to PHP commonly get syntax errors. I'm just going to post a few commonly known errors, failed remedies and the proper resorts to these errors.
Logging errors with PHP
PHP has several settings for logging errors; in this post I will look at the log_errors and error_log settings which control whether errors should be logged and where to.
Form Handling in PHP
I am just gonna go through simple form handling with you, nothing too fancy.
Detecting errors and bottlenecks
In this php tutorial I'll teach different ways to detect errors and bottlenecks in PHP projects.
Developing a URL Handling Helper Class in PHP 5
In this third installment of a series on building helpers in PHP 5, I will provide you with the basic pointers for building a URL-handling helper class. The code examples, though simple, should serve to demonstrate how to create a helper that generates dynamic URLs.
Querying Web Databases
We introduce the following techniques in this tutorial: * Using the five-step web database querying approach to develop database-driven queries * Coding a simple solution to produce HTML <pre> preformatted text * Using the MySQL library functions for querying databases * Handling MySQL DBMS errors * Producing formatted output with the HTML <table> environment * Using include files to modularize database code * Adding multiple queries to a script and consolidating the results into one HTML presentation environment * Performing simple calculations on database data * Developing basic database-driven scripts incrementally and producing modular code encapsulated in functions.
MySQL Database Handling in PHP
Most interactive websites nowadays require data to be presented dynamically and interactively based on input from the user.
 
Categories