Example

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

Solution
  1. Extend the java.lang.Exception.
  2. Change the throws clause to use this new exception.

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

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