mirror of
https://github.com/twigphp/Twig.git
synced 2026-11-11 04:36:47 +00:00
Merge branch '1.x' into 2.x
* 1.x: added more tests added missing hints in some runtime exceptions
This commit is contained in:
+2
-8
@@ -61,7 +61,7 @@ class Error extends \Exception
|
||||
* @param Source|string|null $source The source context where the error occurred
|
||||
* @param \Exception $previous The previous exception
|
||||
*/
|
||||
public function __construct(string $message, int $lineno = -1, $source = null, \Exception $previous = null, bool $autoGuess = true)
|
||||
public function __construct(string $message, int $lineno = -1, $source = null, \Exception $previous = null)
|
||||
{
|
||||
parent::__construct('', 0, $previous);
|
||||
|
||||
@@ -77,14 +77,8 @@ class Error extends \Exception
|
||||
}
|
||||
|
||||
$this->lineno = $lineno;
|
||||
$this->name = $name;
|
||||
|
||||
if ($autoGuess && (-1 === $lineno || null === $name || null === $this->sourcePath)) {
|
||||
$this->guessTemplateInfo();
|
||||
}
|
||||
|
||||
$this->filename = $name;
|
||||
$this->rawMessage = $message;
|
||||
|
||||
$this->updateRepr();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user