Skip to content

Instantly share code, notes, and snippets.

@schauder
Last active December 14, 2015 09:18
Show Gist options
  • Save schauder/5063409 to your computer and use it in GitHub Desktop.
Save schauder/5063409 to your computer and use it in GitHub Desktop.
We found some exception handling code we weren't satisfied with, so we refactored it.
**before**
} catch (final Exception e) {
LOG.error(e.toString(), e);
return null;
}
**after**
} catch (final Exception e) {
LOG.error("You'll get an NPE next", e);
return null;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment