Cannot throw 'identifier' — the type does not inherit from 'Throwable'
The compiler detected an object in a throw statement that was not derived from the class Throwable. This error usually occurs when a throw statement uses a class that does not inherit from the Throwable class. Ensure that the exception class you are throwing is a valid exception class.
The following example illustrates this error:
class BogusException{
//Do something useful here
}
public class Simple{
public void method1(int arg1){
//Do something meaningful
if (arg1 == 0){
throw new BogusException();
//error: BogusException is not a valid exception class
}
}
}