Open Kilda Java Documentation
FlowCommandException.java
Go to the documentation of this file.
1 package org.openkilda.floodlight.kafka;
2 
6 
7 public class FlowCommandException extends Exception {
8  private final String flowId;
9  private final ErrorType type;
10 
11  public FlowCommandException(String flowId, ErrorType type, SwitchOperationException cause) {
12  super(cause);
13  this.flowId = flowId;
14  this.type = type;
15  }
16 
17  public FlowCommandException(String flowId, ErrorType type, String message) {
18  super(message);
19  this.flowId = flowId;
20  this.type = type;
21  }
22 
24  String message = getCause() != null ? getCause().getMessage() : getMessage();
25  return new ErrorData(getType(), message, getFlowId());
26  }
27 
28  public String getFlowId() {
29  return flowId;
30  }
31 
32  public ErrorType getType() {
33  return type;
34  }
35 }
FlowCommandException(String flowId, ErrorType type, String message)
static final< T extends BaseMessage > T getMessage(String json, Class< T > type)
FlowCommandException(String flowId, ErrorType type, SwitchOperationException cause)