Class Twig_Error_Loader

InheritanceTwig_Error_Loader » Twig_Error » Exception

Exception thrown when an error occurs during template loading.

Automatic template information guessing is always turned off as if a template cannot be loaded, there is nothing to guess. However, when a template is loaded from another one, then, we need to find the current context and this is automatically done by Twig_Template::displayWithErrorHandling().

This strategy makes Twig_Environment::resolveTemplate() much faster.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__call() For PHP < 5.3.0, provides access to the getPrevious() method. Twig_Error
__construct() Twig_Error_Loader
appendMessage() Twig_Error
getRawMessage() Gets the raw message. Twig_Error
getTemplateFile() Gets the filename where the error occurred. Twig_Error
getTemplateLine() Gets the template line where the error occurred. Twig_Error
guess() Twig_Error
setTemplateFile() Sets the filename where the error occurred. Twig_Error
setTemplateLine() Sets the template line where the error occurred. Twig_Error

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
guessTemplateInfo() Twig_Error
updateRepr() Twig_Error

Method Details

__construct() public method

public void __construct ( $message, $lineno = -1, $filename null, Exception $previous null )
$message
$lineno
$filename
$previous