Skip to content

Commit

Permalink
Expand description of exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
Tarjei Huse committed Sep 8, 2011
1 parent d3e69c2 commit 011ba3c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Expand Up @@ -442,7 +442,7 @@ ExceptionController support
Using this custom ExceptionController it is possible to leverage the View layer
when building responses for uncaught Exceptions.

The RestBundle view-layer-aware ExceptionController is enabled as follows:
To enable the RestBundle view-layer-aware ExceptionController update the framework section of your config like this:

```yaml
# app/config/config.yml
Expand All @@ -465,6 +465,9 @@ fos_rest:
'Acme\HelloBundle\Exception\MyExceptionWithASafeMessage': true
```

If you want to display the message from the exception in the content of the response, add the
exception to the messages map as well. If not only the statuscode will be returned.

See the following example configuration for more details:
https://github.com/lsmith77/symfony-standard/blob/techtalk/app/config/config.yml

Expand Down

0 comments on commit 011ba3c

Please sign in to comment.