lib/thomler.rb in thomler-0.1.4 vs lib/thomler.rb in thomler-0.1.5
- old
+ new
@@ -8,10 +8,13 @@
if env['PATH_INFO'] == '/favicon.ico'
return [404, {'Content-Type' => 'text/html'}, []]
end
klass, act = get_controller_and_action(env)
controller = klass.new(env)
- text = controller.send(act)
+ begin
+ text = controller.send(act)
+ rescue "Resource not found"
+ end
[200, {'Content-Type' => 'text/html'}, [text]]
end
end
class Controller