Voorbeeld

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

Oplossing
  1. Breid java.lang.Exception uit.
  2. Wijzig de verwerpingsclausule, zodat de nieuwe uitzondering wordt gebruikt.

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$
}
}