# Error/exception handling approach?

**URL:** <https://www.ruby-forum.com/t/error-exception-handling-approach/104780>\
**Category:** Rails\
**Created:** [May 22, 2007, 1:35pm UTC](https://www.ruby-forum.com/t/error-exception-handling-approach/104780 "2007-05-22T13:35:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![greg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/71c47a/32.png) [@greg](https://www.ruby-forum.com/u/greg)\
**Post date:** [May 22, 2007, 1:35pm UTC](https://www.ruby-forum.com/t/error-exception-handling-approach/104780/1 "2007-05-22T13:35:34Z")

</div>

Hi,

Does anyone have any examples/advice re implementing an error handling  
approach. In particular the requirements/idea I had regarding passing  
exceptions/error’s from the model layer back to the controller layer is  
that:

- common exception method to be used across all models/controllers

- this method handles (a) logging error to logs for developer later (b)  
providing an approach user error message, © helping the controller  
what to  
do next [e.g. is error recoverable, let user try again or not], and (d)  
triggers a pager/SMS message for high priority items

- parameters for error method:

Any comments/suggestions sample code would be appreciated.

Regards  
Greg
