Making the inner class of a generic class extend Throwable [duplicate]
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Why doesn’t Java allow generic subclasses of Throwable? I'm trying to make a regular RuntimeException inside a generic class like this: public class SomeGenericClass<SomeType> { public class SomeInternalException extends RuntimeException { [...] } [...] } This piece of code gives me an error on the word RuntimeException saying The generic class SomeGenericClass<SomeType>.SomeInternalException may not subclass