Per ottenere il messaggio (per esempio):
PHP notice in file /private/includes/system/bootstrap.php (83): Undefined variable: s
Ho notato che la classe che utilizzo per gestire l'error handler restituisce null/void sui metodi come getMessage() e getCode() e devo farli passare tramite la funzione dell'error handler in questo modo:
Codice PHP:
set_error_handler(array('system\bootstrap\Blind', 'errorHandler'), E_ALL);
// [...]
public static final function errorHandler($errorNo, $message, $filename, $lineNo) {
new BlindException($errorNo, $message, $filename, $lineNo);
}
Perchè? Si può evitare?
+
a cosa serve \Exception::getPrevious()?