@@ -51,9 +51,9 @@ private static function getHTMLBackTrace($backtrace)
5151 * Function called to display an exception if it occurs.
5252 * It will make sure to purge anything in the buffer before calling the exception displayer.
5353 *
54- * @param Exception $exception
54+ * @param \Throwable $throwable
5555 */
56- public static function getHtmlForException (\ Exception $ exception )
56+ public static function getHtmlForException ($ throwable )
5757 {
5858 //global $sys_error_reporting_mail;
5959 //global $sys_error_messages;
@@ -63,9 +63,9 @@ public static function getHtmlForException(\Exception $exception)
6363
6464 $ display_errors = ini_get ('display_errors ' );
6565 $ color = '#FF0000 ' ;
66- $ type = 'Uncaught ' .get_class ($ exception );
67- if ($ exception ->getCode () != null ) {
68- $ type .= ' with error code ' .$ exception ->getCode ();
66+ $ type = 'Uncaught ' .get_class ($ throwable );
67+ if ($ throwable ->getCode () != null ) {
68+ $ type .= ' with error code ' .$ throwable ->getCode ();
6969 }
7070
7171 $ msg .= "<tr><td colspan='3' style='background-color: $ color; color:white; text-align:center'><b> $ type</b></td></tr> " ;
@@ -74,10 +74,10 @@ public static function getHtmlForException(\Exception $exception)
7474 $ msg .= "<td style='background-color:#AAAAAA; color:white; text-align:center'>File</td> " ;
7575 $ msg .= "<td style='background-color:#AAAAAA; color:white; text-align:center'>Line</td></tr> " ;
7676
77- $ msg .= "<tr><td style='background-color:#EEEEEE; color:black'><b> " .nl2br ($ exception ->getMessage ()).'</b></td> ' ;
78- $ msg .= "<td style='background-color:#EEEEEE; color:black'> " .self ::displayFile ($ exception ->getFile ()).'</td> ' ;
79- $ msg .= "<td style='background-color:#EEEEEE; color:black'> " .$ exception ->getLine ().'</td></tr> ' ;
80- $ msg .= self ::getHTMLBackTrace ($ exception ->getTrace ());
77+ $ msg .= "<tr><td style='background-color:#EEEEEE; color:black'><b> " .nl2br ($ throwable ->getMessage ()).'</b></td> ' ;
78+ $ msg .= "<td style='background-color:#EEEEEE; color:black'> " .self ::displayFile ($ throwable ->getFile ()).'</td> ' ;
79+ $ msg .= "<td style='background-color:#EEEEEE; color:black'> " .$ throwable ->getLine ().'</td></tr> ' ;
80+ $ msg .= self ::getHTMLBackTrace ($ throwable ->getTrace ());
8181 $ msg .= '</table> ' ;
8282
8383 return $ msg ;
0 commit comments