From 243dca5c40650269cec922ed8decfbf6f5eea83a Mon Sep 17 00:00:00 2001 From: Stefan Sundin Date: Fri, 30 Aug 2019 20:27:40 -0700 Subject: [PATCH] Add request method and path to the NotFound exception message. This is useful for exception reporting tools. --- lib/sinatra/base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sinatra/base.rb b/lib/sinatra/base.rb index dc538a634a..4fc43e8790 100644 --- a/lib/sinatra/base.rb +++ b/lib/sinatra/base.rb @@ -1050,7 +1050,7 @@ def route_missing if @app forward else - raise NotFound + raise NotFound, "#{request.request_method} #{request.path_info}" end end