From: nikic <+@ni-po.com> Date: Thu, 23 Dec 2010 10:14:45 +0000 (+0100) Subject: fix Exception documentation, remove use of Twig_SyntaxError X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=9dcf64e386d031a9ae01b009c8e65e64a57d43c3;p=web%2Fkonrad%2Ftwig.git fix Exception documentation, remove use of Twig_SyntaxError --- 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;