fabpot/Twig — pull request #1396 by javiereguiluz (2014-05-08 07:16:25+00:00)
Title: Improved the error message for inherited templates with contents

A very common error for Twig/Symfony newbies is to put HTML contents outside
the `{% block %}` tags in templates that inherit from other templates.
Currently, the error message in these situations is the following:

```
'A template that extends another one cannot have a body.'
```

The error message itself isn't very clear (*"to have a body"*??) but it's worse
when you think that it's very common to have a `{% block body %}` in your
templates. This commit tries to improve the error message to:

```
'A template that extends another one cannot have contents outside its {% block %} tags.'
```