code/libraries/joomlatools/library/template/engine/koowa.php
public function handleException(Exception &$exception)
    {
        if($template = end($this->_stack))
        {
            if($this->_source == $exception->getFile())
            {
                //Prevents any partial templates from leaking.
                ob_get_clean();

                //Re-create the exception and set the real file path
                if($exception instanceof ErrorException)
                {
                    $class = get_class($exception);
                    $file  = $this->getObject('template.locator.factory')->locate($template) ?: $this->_source;

                    $exception = new KTemplateExceptionError(
                        $exception->getMessage(),
                        $exception->getCode(),
                        $exception->getSeverity(),
                        $file,
                        $exception->getLine(),
                        $exception
                    );
                }
            }
        }
    }
public function handleException(Exception &$exception)
    {
        if($template = end($this->_stack))
        {
            if($this->_source == $exception->getFile())
            {
                //Prevents any partial templates from leaking.
                ob_get_clean();

                //Re-create the exception and set the real file path
                if($exception instanceof ErrorException)
                {
                    $class = get_class($exception);
                    $file  = $this->getObject('template.locator.factory')->locate($template) ?: $this->_source;

                    $exception = new KTemplateExceptionError(
                        $exception->getMessage(),
                        $exception->getCode(),
                        $exception->getSeverity(),
                        $file,
                        $exception->getLine(),
                        $exception
                    );
                }
            }
        }
    }
public function handleException ( Exception & $ exception ) { if ( $ template = end ( $ this -> _stack ) ) { if ( $ this -> _source == $ exception -> getFile ( ) ) { //Prevents any partial templates from leaking. ob_get_clean ( ) ; //Re-create the exception and set the real file path if ( $ exception instanceof ErrorException ) { $ class = get_class ( $ exception ) ; $ file = $ this -> getObject ( 'template.locator.factory' ) -> locate ( $ template ) ? : $ this -> _source ; $ exception = new KTemplateExceptionError ( $ exception -> getMessage ( ) , $ exception -> getCode ( ) , $ exception -> getSeverity ( ) , $ file , $ exception -> getLine ( ) , $ exception ) ; } } } }
Handle template exceptions

If an ErrorException is thrown create a new exception and set the file location to the real template file.

@param  \Exception  $exception
@return void
Handle template exceptions