ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> ruby-talk
ruby-talk
Taking Control of Un-handled Exceptions
by Steven Hansen other posts by this author
Jun 30 2006 6:12PM messages near this date
Re: can require 'date' be used in irb | Re: Taking Control of Un-handled Exceptions
Greetings,

I'm trying to catch all un-handled exceptions.  I'm having problems 
handling the RoutingError and UnknownAction exceptions.


I've added the following to my application controller as a protected method:

def rescue_action(exception)
  render(:text =>  "error")
end


As far as I understand, this should catch all uncaught exceptions and 
override the rails default "rescue_action" method.

However, anytime a RoutingError  occurs, the "app_root/public/404.html" 
file gets displayed.  The rescue_action method doesn't even get called.  
Am I doing something wrong?  Any suggestions?

Thanks,
Steven
Thread:
Steven Hansen
Eric Hodel

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved