Skip to content

documentation error? env['sinatra.error'].name #914

@dentarg

Description

@dentarg

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]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions