Permalink
Browse files

global error handler

  • Loading branch information...
1 parent ef24917 commit f4469c59c54664527a66486e2fea23cb7d862870 @mislav committed Aug 9, 2011
Showing with 6 additions and 0 deletions.
  1. +6 −0 app.rb
View
@@ -160,6 +160,12 @@ def last_modified_from_photos(photos)
end
end
+error do
+ # err = env['sinatra.error']
+ status 500
+ haml "%h1 Error: can't perform this operation\n%p Please, try again later."
+end
+
get '/' do
@photos = Instagram::media_popular
@title = "Instagram popular photos"

0 comments on commit f4469c5

Please sign in to comment.