この発想はなかった!
問
以下のコードの欠点を列挙せよ。
コード
public class Hoge { public Exception hoge() { try { //... //... } catch (Exception e) { if(e instanceof FooException) { return new HogeException(e.getMessage()); } } try { //... //... } catch (Exception e) { if(e instanceof BarException) { return new HogeException(e.getMessage()); } } return null; //追記しました。 } }