From: Hidetoshi NAGAI Date: 2003-11-27T18:06:09+09:00 Subject: Re: exceptions in tk after procs? Hi, From: Ferenc Engard Subject: exceptions in tk after procs? Date: Wed, 26 Nov 2003 08:00:13 +0900 Message-ID: <3FC3DF06.E675F7EB@engard.hu> > There are a few situations when ruby code runs in a way that the raised > exceptions are swallowed by the ruby/tk code (I suppose). I didn't look > much after it, but one of this is when ruby code runs as an 'after' > callback. TkAfter had a bug on treatment of TkAfter#cancel_on_exception=(mode). I fixed it on CVS. If you set TkAfter#cancel_on_exception = false, Tk will show an error dialog box when the after callback cause an exception. The default value of cancel_on_exception is true. Then, the TkAfter object stops in silence when cause an exception. On the same commitment to fix the bug, the instance variable "@return_value" keeps the exception. And you can receive the exception by TkAfter#wait method. -- Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)