bhanuprakash513 / google-checkout-java-sample-code

Automatically exported from code.google.com/p/google-checkout-java-sample-code
0 stars 0 forks source link

Utils should not swallow exceptions #3

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
There are places in Utils where this idiom is used:

try {
  return xml.doStuff();
} catch (SomeKindOfException e) {
  e.printStackTrace();
}

return null;

This means that if there's an exception in the XML, it can't be logged or
dealt with, since that exception never makes it out of the method.  I'd
prefer that the exception simply be thrown or wrapped in a generic
UtilException class.

Original issue reported on code.google.com by will.sar...@gmail.com on 25 Apr 2007 at 1:06