範例

public static class ClassA {
public void methodA {

try {
//...
} catch ( Throwable t ) {
//...
}
}
}

解決方案
針對 throws 子句中所宣告的每個 throwable,各建立一個專用的 catch 子句。