Skip to main content


Posted by brucechapman on April 8, 2009 at 10:36 PM PDT

With computers you can have the joy of delinquency without anyone getting hurt. Delinquency being different to maliciousness of course.

So when I saw that Throwable.initCause() method could throw an IAE if the argument was "this", the delinquent in me saw an opportunity for some harmless fun.

public class TheDevilMadeMeDoIt {
    public static void main(String[] args) {
        Throwable t1 = new Throwable("t1");
        Throwable t2 = new Throwable("t2");

I'll leave the result as an exercise.


Prague_hotel, Once you try it out you'll see that it is something completely different. My code does not generate a IAE (tho' maybe it should?). :-{)>

Unxpected IAE at: java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel Yours seems easier to try out. :)