Custom php error pages?

I’m wondering if it’s possible to create custom error pages, i want to release a script and would like nice error pages, it’s not essential just looks more polished.

for example WordPress uses wp_die() with it’s code which re-directed you to a nice page if the error is thrown, instead of a blank white page with the error.

CodeIgniter has nice error pages and even lets you modify them.

Is it worth the hassle? i haven’t been able to work it out yet.

What kind of errors are you trying to replace? HTTP errors e.g. 404 not found? Or exceptions in code.

Both are easy to do but they also have some caveats. The main one is that you need to make sure you return a relevant HTTP status code.

both if possible, i’d like customisable error pages across the board…