Browse code

fix Exception documentation, remove use of Twig_SyntaxError

nikic authored on 23/12/2010 10:14:45 • Fabien Potencier committed on 23/12/2010 11:31:10
Showing 2 changed files
... ...
@@ -457,11 +457,13 @@ Twig can throw exceptions:
457 457
 
458 458
 * ``Twig_Error``: The base exception for all errors.
459 459
 
460
-* ``Twig_SyntaxError``: Thrown to tell the user that there is a problem with
460
+* ``Twig_Error_Syntax``: Thrown to tell the user that there is a problem with
461 461
   the template syntax.
462 462
 
463
-* ``Twig_RuntimeError``: Thrown when an error occurs at runtime (when a filter
463
+* ``Twig_Error_Runtime``: Thrown when an error occurs at runtime (when a filter
464 464
   does not exist for instance).
465 465
 
466
-* `wTwig_Sandbox_SecurityError``: Thrown when an unallowed tag, filter, or
466
+* ``Twig_Error_Loader``: Thrown when an error occurs during template loading.
467
+
468
+* ``Twig_Sandbox_SecurityError``: Thrown when an unallowed tag, filter, or
467 469
   method is called in a sandboxed template.
... ...
@@ -52,7 +52,7 @@ class Twig_Tests_IntegrationTest extends PHPUnit_Framework_TestCase
52 52
 
53 53
         try {
54 54
             $template = $twig->loadTemplate('index.twig');
55
-        } catch (Twig_SyntaxError $e) {
55
+        } catch (Twig_Error_Syntax $e) {
56 56
             $e->setFilename($file);
57 57
 
58 58
             throw $e;