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 java.lang.Throwable
.
What has this RuntimeException to do with my class being generic?