sinatra/sinatra — Issue #426: no error handling when using stream
Author: vjoel
Created: 2011-12-09 21:27:05+00:00
State: open

The usual sinatra error handling seems to be bypassed when using stream.

```ruby
get "/fail-stream" do
stream do |out|
out << "starting to fail..."
sleep 0.2
raise "Failed!"
end
end

get "/fail-nostream" do
out = ""
out << "starting to fail..."
sleep 0.2
raise "Failed!"
out
end
```

The 'fail-nostream' get fails as expected, with backtrace in the log and response, and sinatra keeps running.

The 'fail-stream' get exits sinatra (!), and doesn't send the backtrace in the response.