diff --git a/doc/api.rst b/doc/api.rst index ae59870c8..92eeafca8 100644 --- a/doc/api.rst +++ b/doc/api.rst @@ -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. diff --git a/test/Twig/Tests/integrationTest.php b/test/Twig/Tests/integrationTest.php index 183a56c2e..f2cb36ad7 100644 --- a/test/Twig/Tests/integrationTest.php +++ b/test/Twig/Tests/integrationTest.php @@ -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;