# Exception not caught while in view

**URL:** <https://www.ruby-forum.com/t/exception-not-caught-while-in-view/124587>\
**Category:** Rails\
**Created:** [December 30, 2007, 4:48pm UTC](https://www.ruby-forum.com/t/exception-not-caught-while-in-view/124587 "2007-12-30T16:48:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pedz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/839c29/32.png) [@pedz](https://www.ruby-forum.com/u/pedz)\
**Post date:** [December 30, 2007, 4:48pm UTC](https://www.ruby-forum.com/t/exception-not-caught-while-in-view/124587/1 "2007-12-30T16:48:47Z")

</div>

I’m running Rails 2.0.2.

My controller is subclassed from RetainController (which is subclassed  
from ApplicationController).

Retain Controller has:

```
rescue_from Retain::LogonFailed, :with => :logon_failed
rescue_from Retain::FailedMarkedTrue, :with => :failed_marked_true

```

It works if the exception occurs before I start processing the view. If  
I get the exception while in the view, (this is in development mode),  
Rails will give me the usual exception page.

I thought, maybe, I was done with the controller but that is not the  
case. The controller is still on the stack (way down deep). So, is  
something else catching the exception – maybe in the erb processing?

Thanks,  
pedz
