Mention show_exception :after-handler option
error handler blocks won't run in development unless users set that option
This commit is contained in:
parent
f02c7a0fe3
commit
c5bbb944bc
10
README.md
10
README.md
|
@ -2308,8 +2308,14 @@ end
|
|||
### Error
|
||||
|
||||
The `error` handler is invoked any time an exception is raised from a route
|
||||
block or a filter. The exception object can be obtained from the
|
||||
`sinatra.error` Rack variable:
|
||||
block or a filter. But note in development it will only run if you set the
|
||||
show exceptions option to `:after_handler`.
|
||||
|
||||
```ruby
|
||||
set :show_exceptions, :after_handler
|
||||
```
|
||||
|
||||
The exception object can be obtained from the `sinatra.error` Rack variable.
|
||||
|
||||
``` ruby
|
||||
error do
|
||||
|
|
Loading…
Reference in New Issue