From 9dcf64e386d031a9ae01b009c8e65e64a57d43c3 Mon Sep 17 00:00:00 2001 From: nikic <+@ni-po.com> Date: Thu, 23 Dec 2010 11:14:45 +0100 Subject: [PATCH] fix Exception documentation, remove use of Twig_SyntaxError --- doc/api.rst | 8 +++++--- test/Twig/Tests/integrationTest.php | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/doc/api.rst b/doc/api.rst index ae59870..92eeafc 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 183a56c..f2cb36a 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; -- 1.7.2.5