範例
public
static
class
ClassA {
public
void
methodA {
try
{
//...
}
catch
( Error e ) {
//...
}
}
解決方案
針對 throws 子句中所宣告的每個異常狀況,各建立一個專用的 catch 子句。