public function Twig_Error::__construct in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/twig/twig/lib/Twig/Error.php \Twig_Error::__construct()
Constructor.
Set both the line number and the filename to false to disable automatic guessing of the original template name and line number.
Set the line number to -1 to enable its automatic guessing. Set the filename to null to enable its automatic guessing.
By default, automatic guessing is enabled.
Parameters
string $message The error message:
int $lineno The template line where the error occurred:
string $filename The template file name where the error occurred:
Exception $previous The previous exception:
4 calls to Twig_Error::__construct()
- Twig_Error_Loader::__construct in vendor/
twig/ twig/ lib/ Twig/ Error/ Loader.php - Constructor.
- Twig_Sandbox_SecurityNotAllowedFilterError::__construct in vendor/
twig/ twig/ lib/ Twig/ Sandbox/ SecurityNotAllowedFilterError.php - Constructor.
- Twig_Sandbox_SecurityNotAllowedFunctionError::__construct in vendor/
twig/ twig/ lib/ Twig/ Sandbox/ SecurityNotAllowedFunctionError.php - Constructor.
- Twig_Sandbox_SecurityNotAllowedTagError::__construct in vendor/
twig/ twig/ lib/ Twig/ Sandbox/ SecurityNotAllowedTagError.php - Constructor.
4 methods override Twig_Error::__construct()
- Twig_Error_Loader::__construct in vendor/
twig/ twig/ lib/ Twig/ Error/ Loader.php - Constructor.
- Twig_Sandbox_SecurityNotAllowedFilterError::__construct in vendor/
twig/ twig/ lib/ Twig/ Sandbox/ SecurityNotAllowedFilterError.php - Constructor.
- Twig_Sandbox_SecurityNotAllowedFunctionError::__construct in vendor/
twig/ twig/ lib/ Twig/ Sandbox/ SecurityNotAllowedFunctionError.php - Constructor.
- Twig_Sandbox_SecurityNotAllowedTagError::__construct in vendor/
twig/ twig/ lib/ Twig/ Sandbox/ SecurityNotAllowedTagError.php - Constructor.
File
- vendor/
twig/ twig/ lib/ Twig/ Error.php, line 58
Class
- Twig_Error
- Twig base exception.
Code
public function __construct($message, $lineno = -1, $filename = null, Exception $previous = null) {
if (PHP_VERSION_ID < 50300) {
$this->previous = $previous;
parent::__construct('');
}
else {
parent::__construct('', 0, $previous);
}
$this->lineno = $lineno;
$this->filename = $filename;
if (-1 === $this->lineno || null === $this->filename) {
$this
->guessTemplateInfo();
}
$this->rawMessage = $message;
$this
->updateRepr();
}