# Rescue and warning

**URL:** <https://www.ruby-forum.com/t/rescue-and-warning/98194>\
**Category:** Ruby\
**Created:** [July 13, 2006, 12:30am UTC](https://www.ruby-forum.com/t/rescue-and-warning/98194 "2006-07-13T00:30:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![russellf](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/7bcc69/32.png) [@russellf](https://www.ruby-forum.com/u/russellf)\
**Post date:** [July 13, 2006, 12:30am UTC](https://www.ruby-forum.com/t/rescue-and-warning/98194/1 "2006-07-13T00:30:09Z")

</div>

Hi,  
I have an app that gets regexpr from a config file. I check these  
using Regexpr.new and use rescue to find any with errors. This works  
fine but there are some regexprs that generate waringing. Is there  
anyway I can trap these warning at run time?

Russell
