Login   Register  
PHP Classes
elePHPant
Icontem

File: index.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Johan Barbier  >  Package Exception Error  >  index.php  >  Download  
File: index.php
Role: Unit test script
Content type: text/plain
Description: Test file
Class: Package Exception Error
Turn PHP errors into catchable exceptions
Author: By
Last change: Reflected the changes in the class.
Date: 7 years ago
Size: 351 bytes
 

Contents

Class file image Download
<?php
require_once 'class/package.exceptions.errors.php';

$oErr = new exceptionErrorHandler(true);

/**
 * OR direct call (class exceptionErrorHandler is static and can be used out of its context)
 */
//set_error_handler(array ('exceptionErrorHandler', 'errorHandler'));

$aWrong 'bla';

try {
    
sort($aWrong);
} catch(
Exception $e) {
    echo 
$e;
}
?>