Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

through error on warning php

function exception_error_handler($severity, $message, $file, $line) {
    if (!(error_reporting() & $severity)) {
        // This error code is not included in error_reporting
        return;
    }
    throw new ErrorException($message, 0, $severity, $file, $line);
}
set_error_handler("exception_error_handler");
 
PREVIOUS NEXT
Tagged: #error #warning #php
ADD COMMENT
Topic
Name
8+6 =