Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
magicprinc authored Sep 11, 2023
1 parent 280f4cf commit 6954961
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions src/main/java/io/vertx/core/eventbus/ReplyException.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,19 @@ public class ReplyException extends VertxException {
private final ReplyFailure failureType;
private final int failureCode;

/**
* Create a ReplyException with all attributes.
*
* @param failureType the failure type
* @param failureCode the failure code (e.g. 404)
* @param message the failure message
*/
public ReplyException(ReplyFailure failureType, int failureCode, String message, boolean noStackTrace) {
super(message, noStackTrace);
this.failureType = failureType;
this.failureCode = failureCode;
}

/**
* Create a ReplyException
*
Expand All @@ -34,9 +47,9 @@ public class ReplyException extends VertxException {
* @param message the failure message
*/
public ReplyException(ReplyFailure failureType, int failureCode, String message) {
super(message);
this.failureType = failureType;
this.failureCode = failureCode;
super(message, true);
this.failureType = failureType;
this.failureCode = failureCode;
}

/**
Expand Down Expand Up @@ -81,5 +94,4 @@ public String toString() {
String message = getMessage();
return "(" + failureType + "," + failureCode + ") " + (message != null ? message : "");
}

}

0 comments on commit 6954961

Please sign in to comment.