error_reporting.php

1 lines ASCII Unix (LF)
1
<?php
/**
 * Config-file for development mode with error reporting.
 *
 */

/**
 * Set the error reporting.
 *
 */
error_reporting(-1);              // Report all type of errors
ini_set('display_errors', 1);     // Display all errors 
ini_set('output_buffering', 0);   // Do not buffer outputs, write directly


/**
 * Default exception handler.
 *
 */
set_exception_handler(function($e) {
    echo "Anax: Uncaught exception: <p>" . $e->getMessage() . "</p><pre>" . $e->getTraceAsString(), "</pre>";
});