Routing error does not get caught by rescue_action_in_public

I have this in my application controller.

def rescue_action_in_public(exception)
logger.error(“rescue_action_in_public executed”)
case exception
when ActiveRecord::RecordNotFound,
::ActionController::UnknownAction,
::ActionController::RoutingError
logger.warn(“rendering 404 page”)
render(:file => “#{RAILS_ROOT}/public/404.html”,
:layout => ‘layouts/application’,
:status => “404 Not Found”)
#SystemNotifier.deliver_exception_notification(
# self, request, exception)
else
logger.warn(“rendering 500 page”)
render(:file => “#{RAILS_ROOT}/public/500.html”,
:layout => ‘layouts/application’,
:status => “500 Error”)
#SystemNotifier.deliver_exception_notification(
# self, request, exception)
end
end

So I’m looking for ActionController::RoutingError. My logger.warn()
call is not called on a routing error such as this.

ActionController::RoutingError (Recognition failed for
“/articles/foobar”):

/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/routing.
rb:522:in `recognition_failed’

/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/routing.
rb:512:in `recognize!’

/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/dispatcher.rb:38:in
`dispatch’

/usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib/mongrel/rails.rb:66:in
pro cess' /usr/local/lib/ruby/1.8/thread.rb:135:insynchronize’

/usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib/mongrel/rails.rb:64:in
`pro
cess’

/usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib/mongrel.rb:425:in
`process_
client’

/usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib/mongrel.rb:424:in
`process_
client’

/usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib/mongrel.rb:495:in
`run’

/usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib/mongrel.rb:494:in
`run’

/usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib/mongrel.rb:483:in
`run’

/usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib/mongrel.rb:774:in
`run’

/usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib/mongrel.rb:772:in
`run’

/usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/bin/mongrel_rails:97:in
`run’

/usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib/mongrel/command.rb:163:in
`
run’

/usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/bin/mongrel_rails:194
/usr/local/bin/mongrel_rails:18

I am wondering why that is, as it is impairing my ability to ensure
that the 404 page has the standard layout on it.

Thanks,
Mike