Message6484

Author pekka.klarck
Recipients pekka.klarck, pjenvey
Date 2011-04-14.19:50:11
SpamBayes Score 5.228614e-07
Marked as misclassified No
Message-id <1302810612.72.0.560622655265.issue1729@psf.upfronthosting.co.za>
In-reply-to
Content
A patch that wraps all sun.misc.Signal methods that may raise IllegalArgumentException with try/except that reraises them as ValueErrors is attached. As a result also signal.getsignal and signal.alarm may raise ValueError which they aren't documented to do, but that's probably better than raising equally undocumented Java based IAE.

I would have liked to create unit tests for these fixes but couldn't figure any easy way to do that. Probably tests could temporarily replace sun.misch.Signal.handle with a method that always raises an IAE but I'm not sure is that worth the effort.
History
Date User Action Args
2011-04-14 19:50:12pekka.klarcksetmessageid: <1302810612.72.0.560622655265.issue1729@psf.upfronthosting.co.za>
2011-04-14 19:50:12pekka.klarcksetrecipients: + pekka.klarck, pjenvey
2011-04-14 19:50:12pekka.klarcklinkissue1729 messages
2011-04-14 19:50:12pekka.klarckcreate