prep custom 404

This commit is contained in:
Thomas Reynolds 2011-07-12 22:14:02 -07:00
parent 700eb7913c
commit 61ef9ee3da
5 changed files with 6 additions and 0 deletions

View file

@ -85,6 +85,12 @@ module Middleman
process_request process_request
end end
# Custom 404 handler (to be styled)
error Sinatra::NotFound do
content_type 'text/html'
"<html><body><h1>File Not Found</h1></body>"
end
# See if Tilt cannot handle this file # See if Tilt cannot handle this file
before do before do
result = resolve_template(request.path_info, :raise_exceptions => false) result = resolve_template(request.path_info, :raise_exceptions => false)