You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2019/05/24 06:42:57 UTC

[GitHub] [incubator-iotdb] jt2594838 commented on a change in pull request #180: [IOTDB-95]keep stack trace when logging or throwing an Exception

jt2594838 commented on a change in pull request #180: [IOTDB-95]keep stack trace when logging or throwing an Exception
URL: https://github.com/apache/incubator-iotdb/pull/180#discussion_r287232651
 
 

 ##########
 File path: iotdb/src/main/java/org/apache/iotdb/db/writelog/recover/ExclusiveLogRecoverPerformer.java
 ##########
 @@ -316,9 +314,8 @@ private void replayLog() throws RecoverException {
     try {
       FileNodeManager.getInstance().closeOneFileNode(writeLogNode.getFileNodeName());
     } catch (FileNodeManagerException e) {
-      logger.error("Log node {} cannot perform flush after replaying logs! Because {}",
-          writeLogNode.getIdentifier(), e.getMessage());
-      throw new RecoverException(e);
+      throw new RecoverException(String.format("Log node %s cannot perform flush after replaying logs! Because %s",
+          writeLogNode.getIdentifier(), e.getMessage()), e);
 
 Review comment:
   If the programmer only wants to know the cause of the exception, this may help him find out without looking down to the lower exceptions.
   While this is not necessary, I will remove them for consistency.

----------------------------------------------------------------
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