コード例 #1
0
 /**
  * Метод форматирует вывод Exception в html
  */
 public static function getHtml(Exception $exception)
 {
     //Вычитываем [exception.html] и производим замены
     try {
         return str_replace('{STACK}', ExceptionHelper::formatStackHtml($exception), file_get_contents(file_path(__DIR__, 'exception.html')));
     } catch (Exception $ex) {
         //Если в методе форматирования эксепшена ошибка - прекращаем выполнение.
         die("Exception [{$exception->getMessage()}] stack format error: [{$ex->getMessage()}]");
     }
 }