E
Eric Sosman
I don't quite get it, what would be the actual compiletime type of "ex"
in the (here empty) catch-block.
It might be Throwable, or Exception, or maybe the least
common superclass of FooException/BarException/WeirdException.
Such a dodge might create additional complications of its
own, since the only methods and fields you could use with "ex"
would be those of the chosen superclass. Most (all?) of Java's
own exceptions inherit everything from Throwable so an "ex" type
of Throwable would be all right, but if FooException has a
getOffendingFoo() method you couldn't use it until you'd done a
downcast -- which, in a "combined catch," would probably need
instanceof or other reflective techniques clumsier than the
separate catch blocks being replaced.