# How do I call the exception\_notifier from my own rescue\_action\_in\_public?

**URL:** <https://www.ruby-forum.com/t/how-do-i-call-the-exception-notifier-from-my-own-rescue-action-in-public/125345>\
**Category:** Rails\
**Created:** [January 8, 2008, 1:12pm UTC](https://www.ruby-forum.com/t/how-do-i-call-the-exception-notifier-from-my-own-rescue-action-in-public/125345 "2008-01-08T13:12:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [January 8, 2008, 1:12pm UTC](https://www.ruby-forum.com/t/how-do-i-call-the-exception-notifier-from-my-own-rescue-action-in-public/125345/1 "2008-01-08T13:12:43Z")

</div>

Hi all!

I’ve been using the excellent exception\_nofitier (  
[http://agilewebdevelopment.com/plugins/exception\_notifier](http://agilewebdevelopment.com/plugins/exception_notifier) ) a while  
now, but want to change the way it interacts with my application.

I now have my own rescue\_action\_in\_public which takes me to a “Error.  
Describe the problem”-page. After filling out some user data the user  
can then click on submit. This is where the problem comes:

I want to trigger the exception\_notifier when I submit my form. I have  
tried to save the variables exception and request and then simply  
redefine them so they appear as when the error occurred.

My code goes something like this:

#controller/application.rb  
def rescue\_action\_in\_public(exception)  
@saved\_exception = exception  
@saved\_request = request  
render :partial =\> “errorpage”  
end

After pushing the form in errorpage i go to this:

#controller/application.rb  
def submit\_error()  
request = params[:saved\_request]

ExceptionNotifiable::rescue\_action\_in\_public(params[:saved\_exception])  
end

However, I keep getting errors like  
undefined method `rescue\_action\_in\_public’ for  
ExceptionNotifiable:Module even though they are in that module. I have  
included the ExceptionNotifiable and also tried to make the methods  
non-private.

Anyone can help me with this? How can I trigger the ExceptionNotifier  
myself?
