- improvement added patch for additional SmartyCompilerException properties for better access to scource information (forum topic 24559)

This commit is contained in:
Uwe.Tews@googlemail.com
2013-09-17 20:44:41 +00:00
parent bf8275ee20
commit 5bbfbafc47
3 changed files with 29 additions and 2 deletions
@@ -798,7 +798,12 @@ abstract class Smarty_Internal_TemplateCompilerBase
$error_text .= ', expected one of: ' . implode(' , ', $expect);
}
}
throw new SmartyCompilerException($error_text);
$e = new SmartyCompilerException($error_text);
$e->line = $line;
$e->source = trim(preg_replace('![\t\r\n]+!', ' ', $match[$line - 1]));
$e->desc = $args;
$e->template = $this->template->source->filepath;
throw $e;
}
}