StefanRRichter commented on a change in pull request #7571: [FLINK-10724] 
Refactor failure handling in check point coordinator
URL: https://github.com/apache/flink/pull/7571#discussion_r278909538
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointException.java
 ##########
 @@ -18,18 +18,38 @@
 
 package org.apache.flink.runtime.checkpoint;
 
+import org.apache.flink.util.Preconditions;
+
 /**
  * Base class for checkpoint related exceptions.
  */
 public class CheckpointException extends Exception {
 
        private static final long serialVersionUID = -4341865597039002540L;
 
-       public CheckpointException(String message, Throwable cause) {
-               super(message, cause);
+       private final CheckpointFailureReason checkpointFailureReason;
+
+       public CheckpointException(CheckpointFailureReason failureReason) {
+               super(failureReason.message());
+               this.checkpointFailureReason = 
Preconditions.checkNotNull(failureReason);
+       }
+
+       public CheckpointException(String message, CheckpointFailureReason 
failureReason) {
+               super(message + failureReason.message());
 
 Review comment:
   Are you sure that the formatting looks always good when we just concatenate 
`message` and `failureReason.message()` without any separation?

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to