Pessoal,
Recentemente fui exposto a prática de código obscena abaixo ilustrada:public class DAOException extends RuntimeException {
public DAOException(Throwable cause) {
super(cause);
}
}
public class XxxxYyyyDAOImpl implements XxxxDAO {
public Xxxx metodo1() {
try {
//....
return null;
} catch (Exception e) {
throw new DAOException(e);
}
}
public List<Xxxx> metodo2() {
try {
//....
return null;
} catch (Exception e) {
throw new DAOException(e);
}
}
//...
}
