Throwable can be either checked or uncheked exception
and also same is the case with Exception it will be a checked exception unless it belongs to RuntimeException branch ,
so declaring it here like this
is basically violating the rule that : new or wider checked Exception that are not thrown by super class version of a method should not be thrown by its overriding versions
because when you are calling the super class version it might throw a Throwable which is super class to the class Exception (Since it's a super class version , it can throw a wider Exception)
so modifying the code to handle it will solve the issue:
or else if you modify the super class method implementation and make sure it throws Excepetion
it should work i guess.
for Throwable there is no problem because when you are saying
it should handle it or the method calling will handle it but its a Throwable in both cases which is the super class of all errors and exceptions in the Java language.
so its not showing any compilation error i guess.
I hope this explanation is correct.
Some one correct me if i am wrong