From: tamouse mailing lists Date: 2012-12-07T22:40:46+09:00 Subject: Re: how to reproduce error System error (Failure) Imap On Thu, Dec 6, 2012 at 11:35 PM, Lucky Nl wrote: > Ryan Davis wrote in post #1088127: >> On Dec 6, 2012, at 01:47 , Lucky Nl wrote: >> >>> Am using Imap in ruby 1.8.7 >>> I got error ERROR (12791) System error (Failure) in my code. >>> But not sure when this will be happen. >>> Can anyone suggest when this error will be raise and how to reproduce >>> this error. >> >> If you look through the code of net/imap.rb you'll see that there is no >> occurrence of "ERROR" anywhere. Nor in digest nor ssl. You'll need to >> look at your backtrace and actually debug where this is coming from. > > This issue raised at line in my code imap.examine("[Gmail]/Sent Mail") > I have use rescue Exception => e > But this hadn't come to this block > > -- > Posted via http://www.ruby-forum.com/. > Really hard to debug code without seeing it, but... Generally when these things happen, it's because of passing in bad references and so on. Make sure you are checking all error returns and trapping the exceptions you can. Break down the code to small enough components you can test each one by itself (and test first, early and often!). Are you stuck using 1.8.7? 1.9.x are *so* much better. You can help us help you tremendously by showing us the real code and the backtrace listings.