From: Michael Davis Date: 2003-07-30T08:54:09+09:00 Subject: Re: Warnings? I can appreciate the difficulty, however, I would rather not suppress all warnings and yet I have code that generates warnings that are okay. Will it be possible to turn off warnings and then turn them back on again at runtime? This would at least provide me an option to disable warning messages during methods that generate warnings. Thanks, Michael Davis Yukihiro Matsumoto wrote: > Hi, > > In message "Re: Warnings?" > on 03/07/30, Michael Davis writes: > > |How about a way to trap warnings similar to rescue Exception so we can trap and suppress certain expected warnings? > > Since warning is a mere message, not exit like exceptions, it is more > difficult to catch. You can suppress warning messages by redirecting > $stderr temporarily (although it's not thread safe). > > matz. > > >