class Bouncy extends Throwable {
}
// Error: the generic class Bouncy may not subclass java.lang.Throwable
Why doesn\'t Java
Short answer: because they took shortcuts, just like they did with erasure.
Long answer: as others already indicated, because of erasure, there is no way to make a difference at runtime between a "catch MyException
But that doesn't mean that there is no need for generic exceptions. I want generics to be able to use generic fields! They could have simply allowed generic exceptions, but only allow catching them in the raw state (e.g. "catch MyException").
Granted, this would make generics even more complicated. This is to show just how bad the decision to erase generics was. When will we have a Java version that supports real generics (with RTTI), not the current syntactic sugar?