public function Twig_Error::__construct

Constructor.

Parameters

string $message The error message:

integer $lineno The template line where the error occurred:

string $filename The template file name where the error occurred:

Exception $previous The previous exception:

File

drupal/core/vendor/twig/twig/lib/Twig/Error.php, line 33

Class

Twig_Error
Twig base exception.

Code

public function __construct($message, $lineno = -1, $filename = null, Exception $previous = null) {
  if (version_compare(PHP_VERSION, '5.3.0', '<')) {
    $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();
}