fix Exception documentation, remove use of Twig_SyntaxError

This commit is contained in:
nikic
2010-12-23 11:14:45 +01:00
committed by Fabien Potencier
parent 6d030c266a
commit 9dcf64e386
2 changed files with 6 additions and 4 deletions
+5 -3
View File
@@ -457,11 +457,13 @@ Twig can throw exceptions:
* ``Twig_Error``: The base exception for all errors.
* ``Twig_SyntaxError``: Thrown to tell the user that there is a problem with
* ``Twig_Error_Syntax``: Thrown to tell the user that there is a problem with
the template syntax.
* ``Twig_RuntimeError``: Thrown when an error occurs at runtime (when a filter
* ``Twig_Error_Runtime``: Thrown when an error occurs at runtime (when a filter
does not exist for instance).
* `wTwig_Sandbox_SecurityError``: Thrown when an unallowed tag, filter, or
* ``Twig_Error_Loader``: Thrown when an error occurs during template loading.
* ``Twig_Sandbox_SecurityError``: Thrown when an unallowed tag, filter, or
method is called in a sandboxed template.
+1 -1
View File
@@ -52,7 +52,7 @@ class Twig_Tests_IntegrationTest extends PHPUnit_Framework_TestCase
try {
$template = $twig->loadTemplate('index.twig');
} catch (Twig_SyntaxError $e) {
} catch (Twig_Error_Syntax $e) {
$e->setFilename($file);
throw $e;