Location: PHPKode > scripts > RS Error > rs-error/example.php
<?php

include_once('class.error.php');

// app error handling
function errorHandler($code, $msg, $file, $line)
{
   $err = new iowacore2_error($code, $msg, $file, $line);
   $err->writeToLog(); // log error
   $err->displayError(); // show error
}
set_error_handler('errorHandler', ERROR_LEVEL);

// PEAR error handling
$error = new iowacore2_error();
PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, array(&$error, 'errorCallback'));
Return current item: RS Error