You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@helix.apache.org by GitBox <gi...@apache.org> on 2019/07/22 19:56:22 UTC

[GitHub] [helix] pkuwm opened a new issue #352: Don't log and throw: removing redundant logs right before throwing exception

pkuwm opened a new issue #352: Don't log and throw: removing redundant logs right before throwing exception
URL: https://github.com/apache/helix/issues/352
 
 
   Same log message should not be logged right while an exception is also thrown. Ex.:
   https://github.com/apache/helix/blob/3e670ded2ece50e21b76fcab7fed7cb61a24eea1/helix-core/src/main/java/org/apache/helix/task/TaskDriver.java#L337
   
   The principal "don't log and throw" would be a nice practice for handling exceptions in Java. We would like to keep the logs clean and helpful without redundancy. An exception message is enough to describe the exceptional event. And the stack trace tells you in which class, method, and line the exception was thrown.
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services