make not_found also trigger on NotFound exception directly, fixes #500
This commit is contained in:
parent
a51beb0346
commit
c9c0e552ed
|
@ -1180,7 +1180,8 @@ module Sinatra
|
|||
|
||||
# Sugar for `error(404) { ... }`
|
||||
def not_found(&block)
|
||||
error 404, &block
|
||||
error(404, &block)
|
||||
error(Sinatra::NotFound, &block)
|
||||
end
|
||||
|
||||
# Define a named template. The block must return the template source.
|
||||
|
|
Loading…
Reference in New Issue