public function printDocument()
    {
        header("Content-Type: {$this->_contentType}; {$this->_charset}");

        try {
            $this->controller->processRequest();
        } catch (Exception $e) {
            $message = substr(
                preg_replace('/\s+/', ' ', $e->getMessage()), 0, 150
            );
            header("HTTP/1.0 400 $message");
            throw $e;
        }

        echo $this->getDocument();
    }
public function printDocument()
    {
        header("Content-Type: {$this->_contentType}; {$this->_charset}");

        try {
            $this->controller->processRequest();
        } catch (Exception $e) {
            $message = substr(
                preg_replace('/\s+/', ' ', $e->getMessage()), 0, 150
            );
            header("HTTP/1.0 400 $message");
            throw $e;
        }

        echo $this->getDocument();
    }
public function printDocument ( ) { header ( "Content-Type: {$this->_contentType}; {$this->_charset}" ) ; try { $ this -> controller -> processRequest ( ) ; } catch ( Exception $ e ) { $ message = substr ( preg_replace ( '/\s+/' , ' ' , $ e -> getMessage ( ) ) , 0 , 150 ) ; header ( "HTTP/1.0 400 $message" ) ; throw $ e ; } echo $ this -> getDocument ( ) ; }
Prints the document.

Returns a 'client exception' if an exception has occurred.

@return void
Prints the document .