I started writing a simple Sinatra application today and I am trying to understand the error report, but for some reason I cannot get it to work correctly.
I know here http://railsapi.com/doc/sinatra-v1.0/ , it talks about working with error handling / error handling, but when I run my examples, I cannot get it working.
require 'sinatra'
error 400..510 do
'Boom'
end
get '/say/*' do
params[:splat]
end
When I run the application on my computer, I get an error code 404, but the text 'Boom'does not appear in the browser, but only on the browser page 404. I am sure that I am doing something wrong, but I just can’t understand.
source
share