# Disable error report

**URL:** <https://www.ruby-forum.com/t/disable-error-report/144827>\
**Category:** Rails\
**Created:** [August 2, 2008, 8:08pm UTC](https://www.ruby-forum.com/t/disable-error-report/144827 "2008-08-02T20:08:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![andy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/aeb1de/32.png) [@andy](https://www.ruby-forum.com/u/andy)\
**Post date:** [August 2, 2008, 8:08pm UTC](https://www.ruby-forum.com/t/disable-error-report/144827/1 "2008-08-02T20:08:58Z")

</div>

I have some function

def func()  
val = 0 / 0  
end

func()

…  
some code  
…

* * *

=\> error

how to specify the functions do not show the error and continued  
implementation of the program?

---

<div class="post-metadata">

**Author:** ![andy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/aeb1de/32.png) [@andy](https://www.ruby-forum.com/u/andy)\
**Post date:** [August 3, 2008, 9:45am UTC](https://www.ruby-forum.com/t/disable-error-report/144827/2 "2008-08-03T09:45:49Z")

</div>

On Sat, Aug 2, 2008 at 10:50 AM, Andy [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I have some function
> 
> def func()  
> val = 0 / 0  
> end
> 
> how to specify the functions do not show the error and continued  
> implementation of the program?

Rescue it.

val = 0 / 0 rescue 0

or

val = 0 / 0 rescue nil

–  
Greg D.  
[http://destiney.com/](http://destiney.com/)
