The documentation at http://www.sinatrarb.com/intro.html#Error has an example
error do
'Sorry there was a nasty error - ' + env['sinatra.error'].name
end
But when I try that, I get
ERROR NoMethodError: undefined method `name' for #<StandardError: StandardError>
Is the documentation wrong? Is there something missing from the documentation? Am I doing something wrong?
edit: using ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin13.0]