L
laredotornado
Hi,
I'm using Java 1.5 on a Resin 3.0.19 web/app server. I'm using PMD as
the code-checker, and in an EJB, it is complaining about
public List<SubvendorCustomerRecord> getSubvendorCustomerReport(
final Integer subvendorId) throws RemoteException {
List<SubvendorCustomerRecord> results = new
ArrayList<SubvendorCustomerRecord>();
try {
AbstractReport report = new SubvendorCustomerReport(subvendorId);
results.addAll( report.getReportData() );
} catch (Exception e) {
LOG.error(e.getMessage(), e);
throw new RemoteException(e.getMessage());
}
return results;
}
Specifically the "throw new RemoteException(e.getMessage());" line,
with the complaint, "New exception is thrown in catch block. Original
stack trace may be lost." Does anyone know how I can rewrite the
above so that I can still log any error but at the same time get rid
of the annoying code-checker warning?
Thanks, - Dave
I'm using Java 1.5 on a Resin 3.0.19 web/app server. I'm using PMD as
the code-checker, and in an EJB, it is complaining about
public List<SubvendorCustomerRecord> getSubvendorCustomerReport(
final Integer subvendorId) throws RemoteException {
List<SubvendorCustomerRecord> results = new
ArrayList<SubvendorCustomerRecord>();
try {
AbstractReport report = new SubvendorCustomerReport(subvendorId);
results.addAll( report.getReportData() );
} catch (Exception e) {
LOG.error(e.getMessage(), e);
throw new RemoteException(e.getMessage());
}
return results;
}
Specifically the "throw new RemoteException(e.getMessage());" line,
with the complaint, "New exception is thrown in catch block. Original
stack trace may be lost." Does anyone know how I can rewrite the
above so that I can still log any error but at the same time get rid
of the annoying code-checker warning?
Thanks, - Dave