Merge branch '1.x' into 2.x

* 1.x:
  added more tests
  added missing hints in some runtime exceptions
This commit is contained in:
Fabien Potencier
2019-04-12 12:08:49 +02:00
16 changed files with 114 additions and 54 deletions
+2 -8
View File
@@ -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();
}