An error and exception handler for PHP 5