protected function buildFatal()
    {
        $haveFatal = isset($this->stats['counts']['fatal']);
        if (!$haveFatal) {
            return '';
        }
        $lastError = $this->errorHandler->get('lastError');
        $isHtml = $lastError['isHtml'];
        $backtrace = $lastError['backtrace'];
        $html = '<h3>Fatal Error</h3>';
        $html .= '<ul class="list-unstyled indent">';
        if (\count($backtrace) > 1) {
            // more than one trace frame
            $table = $this->outputHtml->buildTable(
                $backtrace,
                array(
                    'attribs' => 'trace table-bordered',
                    'caption' => 'trace',
                    'columns' => array('file','line','function'),
                )
            );
            $html .= '<li>'.$lastError['message'].'</li>';
            $html .= '<li>'.$table.'</li>';
            if (!$isHtml) {
                $html = \str_replace($lastError['message'], \htmlspecialchars($lastError['message']), $html);
            }
        } else {
            $keysKeep = array('typeStr','message','file','line');
            $lastError = \array_intersect_key($lastError, \array_flip($keysKeep));
            $html .= '<li>'.$this->outputHtml->dump($lastError).'</li>';
            if ($isHtml) {
                $html = \str_replace(\htmlspecialchars($lastError['message']), $lastError['message'], $html);
            }
        }
        if (!\extension_loaded('xdebug')) {
            $html .= '<li>Want to see a backtrace here?  Install <a target="_blank" href="https://xdebug.org/docs/install">xdebug</a> PHP extension.</li>';
        }
        $html .= '</ul>';
        return $html;
    }