/** * Note: if the exception has a `getTitle()` method, that value is displayed as the popup's header, otherwise the * exception's class name will be shown instead. * * @param Exception|Error $exception * @param string $popupTitle * @param string $stackTrace */ static function renderPopup($exception, $popupTitle, $stackTrace) { self::renderStyles(); ?> <!DOCTYPE HTML><html> <head> <meta charset="UTF-8"> <title><?php echo $popupTitle; ?> </title> </head> <body id="__error"> <div id="__panel"> <div class="__title-bar"><?php echo $popupTitle; ?> </div> <div class="__panel-body"> <div id="__feedback">Please switch to PHPStorm/IDEA to view the code at the error location.</div> <img src="<?php echo self::getIcon(); ?> "> <div class="__message"> <?php $title = method_exists($exception, 'getTitle') ? $exception->getTitle() : self::friendlyClass(get_class($exception)); if ($title) { echo "<h3>{$title}</h3>"; } echo "<div>" . ucfirst(ErrorConsole::processMessage($exception->getMessage())) . "</div>"; if (!empty($exception->info)) { echo "<div class='__info'>{$exception->info}</div>"; } ?> </div> <div id="__error-location"> <?php $link = ErrorConsole::errorLink($exception->getFile(), $exception->getLine(), 1); if ($link) { echo "Thrown from {$link}, line <b>{$exception->getLine()}</b>"; } ?> <div class="__more"> <a id="__more" class=" __btn" href="javascript:void(document.getElementById('__panel').className='__show')" onclick="this.style.display='none';window.setTimeout(function(){document.body.scrollTop=document.getElementById('__error-location').offsetTop})"> Stack trace <span style="font-size:16px">▾</span></a> </div> </div> </div> <div id="__trace"> <?php echo $stackTrace; ?> </div> <iframe name="hidden" style="display:none"></iframe> </body><html> <?php }