Report abuse

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
  # General error catcher.
def rescue_action_in_public(exception)
  case exception
  when NoMethodError
    error_stickie "Please donate us!!"
    # render_404
    render_home
  when ActiveRecord::RecordNotFound
    error_stickie "All your database are belong to us!!"
    # render_404
    render_home
  when Timeout::Error
    error_stickie "Twitter guys are sleeping!!"
    render_home
  when Twitter::RESTError
    error_stickie "You lost your Twitter key!!"
    render_home
  else
    error_stickie "We're taking a shower!!"
    # render_500
    render_home
  end
end