Generics are checked at compile-time for type-correctness. The generic type information is then removed in a process called type erasure.
Because of type erasure, type parameters cannot be determined at run-time.
Example, when an ArrayList is examined at runtime, there is no general way to determine whether, before type erasure, it was an ArrayList<Integer> or an ArrayList<Float>.
A generic class cannot extend the Throwable class in any way, directly or indirectly:
The reason why this is not supported is due to type erasure: