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_r278909597
 
 

 ##########
 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());
+               this.checkpointFailureReason = 
Preconditions.checkNotNull(failureReason);
+       }
+
+       public CheckpointException(CheckpointFailureReason failureReason, 
Throwable cause) {
+               super(failureReason.message(), cause);
+               this.checkpointFailureReason = 
Preconditions.checkNotNull(failureReason);
+       }
+
+       public CheckpointException(String message, CheckpointFailureReason 
failureReason, Throwable cause) {
+               super(message + failureReason.message(), cause);
 
 Review comment:
   Same question here.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to