src/Logging/DebugViewFriendlyErrorFormatter.php
public function output($statusCode)
    {
        // TODO: Refactor into a content-type option
        if (Director::is_ajax()) {
            return $this->getTitle();
        }

        $renderer = Debug::create_debug_view();
        $output = $renderer->renderHeader();
        $output .= $renderer->renderInfo("Website Error", $this->getTitle(), $this->getBody());

        $adminEmail = Email::config()->get('admin_email');
        if ($adminEmail) {
            $mailto = Email::obfuscate($adminEmail);
            $output .= $renderer->renderParagraph('Contact an administrator: ' . $mailto . '');
        }

        $output .= $renderer->renderFooter();
        return $output;
    }
public function output($statusCode)
    {
        // TODO: Refactor into a content-type option
        if (Director::is_ajax()) {
            return $this->getTitle();
        }

        $renderer = Debug::create_debug_view();
        $output = $renderer->renderHeader();
        $output .= $renderer->renderInfo("Website Error", $this->getTitle(), $this->getBody());

        $adminEmail = Email::config()->get('admin_email');
        if ($adminEmail) {
            $mailto = Email::obfuscate($adminEmail);
            $output .= $renderer->renderParagraph('Contact an administrator: ' . $mailto . '');
        }

        $output .= $renderer->renderFooter();
        return $output;
    }
public function output ( $ statusCode ) { // TODO: Refactor into a content-type option if ( Director :: is_ajax ( ) ) { return $ this -> getTitle ( ) ; } $ renderer = Debug :: create_debug_view ( ) ; $ output = $ renderer -> renderHeader ( ) ; $ output .= $ renderer -> renderInfo ( "Website Error" , $ this -> getTitle ( ) , $ this -> getBody ( ) ) ; $ adminEmail = Email :: config ( ) -> get ( 'admin_email' ) ; if ( $ adminEmail ) { $ mailto = Email :: obfuscate ( $ adminEmail ) ; $ output .= $ renderer -> renderParagraph ( 'Contact an administrator: ' . $ mailto . '' ) ; } $ output .= $ renderer -> renderFooter ( ) ; return $ output ; }
Return the appropriate error content for the given status code

@param int $statusCode
@return string Content in an appropriate format for the current request
Return the appropriate error content for the given status code