Voorbeeld

public static class ThrowableSubclass extends Throwable {
public ThrowableSubclass( String s ){
super(s);
}
}

public class Example {
public void run() throws ThrowableSubclass {
throw new ThrowableSubclass( "Probleem" ); //$NON-NLS-1$
}
}

Oplossing
Breid java.lang.Exception uit.

public static class ExceptionSubclass extends Exception {
public ExceptionSubclass( String s ){
super(s);
}
}

public class Example {
public void run() throws ExceptionSubclass {
throw new ExceptionSubclass( "Probleem" ); //$NON-NLS-1$
}
}