| Conditions | 1 |
| Paths | 1 |
| Total Lines | 17 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 15 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | 2 | public function compile(Compiler $compiler) |
|
| 27 | { |
||
| 28 | $compiler |
||
| 29 | 2 | ->write("try {\n") |
|
| 30 | 2 | ->indent() |
|
| 31 | 2 | ->subcompile($this->getNode('body')) |
|
| 32 | 2 | ->outdent() |
|
| 33 | 2 | ->write("} catch (\\Twig_Error_Runtime \$exception) {\n") |
|
| 34 | 2 | ->indent() |
|
| 35 | 2 | ->write("if (\$exception->getPrevious() === null) {\n") |
|
| 36 | 2 | ->indent() |
|
| 37 | 2 | ->write("throw \$exception;\n") |
|
| 38 | 2 | ->outdent() |
|
| 39 | 2 | ->write("}\n\n") |
|
| 40 | 2 | ->write("\$suppressedException = new \\Shoot\\Shoot\\SuppressedException(\$exception->getPrevious());\n") |
|
| 41 | 2 | ->outdent() |
|
| 42 | 2 | ->write("}\n\n"); |
|
| 43 | 2 | } |
|
| 45 |