88,7 → 88,7 |
* Si une boucle génère de multiple exception (ou erreur) identique une seule sera stockée. |
* @param Exception $e l'exception à traiter |
*/ |
public static function gererException(Exception $e) { |
public static function gererException(Throwable $e) { |
$cle = hash('md5', $e->getMessage().'-'.$e->getFile().'-'.$e->getLine()); |
if (!isset(self::$exceptions[$cle])) { |
self::$exceptions[$cle] = $e; |
173,7 → 173,7 |
* Logue une exception donnée sous une forme lisible si self::logger vaut true. |
* @param Exception $e l'exception à logger |
*/ |
private static function loggerException(Exception $e) { |
private static function loggerException(Throwable $e) { |
if (self::$logger) { |
$message = self::formaterExceptionTxt($e); |
Log::ajouterEntree('erreurs', $message); |
188,7 → 188,7 |
* @since 0.3 |
* @param Exception l'exception à formater. |
*/ |
public static function formaterExceptionDebug(Exception $e) { |
public static function formaterExceptionDebug(Throwable $e) { |
$txt = ''; |
if ($e->getSeverity() == E_USER_NOTICE) { |
$txt = $e->getMessage(); |
203,7 → 203,7 |
* @since 0.3 |
* @param Exception l'exception à formater. |
*/ |
public static function formaterExceptionTxt(Exception $e) { |
public static function formaterExceptionTxt(Throwable $e) { |
$message = ''; |
$message .= $e->getMessage()."\n"; |
$message .= 'Fichier : '.$e->getFile()."\n"; |
220,7 → 220,7 |
* @since 0.3 |
* @param Exception l'exception à formater. |
*/ |
public static function formaterExceptionXhtml(Exception $e) { |
public static function formaterExceptionXhtml(Throwable $e) { |
$message = ''; |
$message .= '<div class="debogage">'."\n"; |
$message .= $e->getMessage()."\n"; |