*
* @return string The filename
*/
- public function getFilename()
+ public function getTemplateFile()
{
return $this->filename;
}
*
* @param string $filename The filename
*/
- public function setFilename($filename)
+ public function setTemplateFile($filename)
{
$this->filename = $filename;
$this->updateRepr();
}
+ /**
+ * Gets the template line where the error occurred.
+ *
+ * @return integer The template line
+ */
+ public function getTemplateLine()
+ {
+ return $this->lineno;
+ }
+
+ /**
+ * Sets the template line where the error occurred.
+ *
+ * @param integer $lineno The template line
+ */
+ public function setTemplateLine($lineno)
+ {
+ $this->lineno = $lineno;
+
+ $this->updateRepr();
+ }
+
protected function updateRepr()
{
$this->message = $this->rawMessage;
$this->checkBodyNodes($body);
}
} catch (Twig_Error_Syntax $e) {
- if (null === $e->getFilename()) {
- $e->setFilename($this->stream->getFilename());
+ if (null === $e->getTemplateFile()) {
+ $e->setTemplateFile($this->stream->getFilename());
}
throw $e;