protected function _template(Exception $exception, $method, $code)
    {
        $exception = $this->_unwrap($exception);
        $isHttpException = $exception instanceof HttpException;

        if (!Configure::read('debug') && !$isHttpException || $isHttpException) {
            $template = 'error500';
            if ($code < 500) {
                $template = 'error400';
            }

            return $this->template = $template;
        }

        $template = $method ?: 'error500';

        if ($exception instanceof PDOException) {
            $template = 'pdo_error';
        }

        return $this->template = $template;
    }
protected function _template(Exception $exception, $method, $code)
    {
        $exception = $this->_unwrap($exception);
        $isHttpException = $exception instanceof HttpException;

        if (!Configure::read('debug') && !$isHttpException || $isHttpException) {
            $template = 'error500';
            if ($code < 500) {
                $template = 'error400';
            }

            return $this->template = $template;
        }

        $template = $method ?: 'error500';

        if ($exception instanceof PDOException) {
            $template = 'pdo_error';
        }

        return $this->template = $template;
    }
protected function _template ( Exception $ exception , $ method , $ code ) { $ exception = $ this -> _unwrap ( $ exception ) ; $ isHttpException = $ exception instanceof HttpException ; if ( ! Configure :: read ( 'debug' ) && ! $ isHttpException || $ isHttpException ) { $ template = 'error500' ; if ( $ code < 500 ) { $ template = 'error400' ; } return $ this -> template = $ template ; } $ template = $ method ? : 'error500' ; if ( $ exception instanceof PDOException ) { $ template = 'pdo_error' ; } return $ this -> template = $ template ; }
Get template for rendering exception info.

@param \Exception $exception Exception instance.
@param string $method Method name.
@param int $code Error code.
@return string Template name
Get template for rendering exception info .