Skip to content

Commit

Permalink
Overriding constructor of InvalidLRAIdException for not forcing cause…
Browse files Browse the repository at this point in the history
… being passed as null

Signed-off-by: Ondra Chaloupka <[email protected]>
  • Loading branch information
ochaloup committed Feb 8, 2019
1 parent 378715e commit 4b99e43
Showing 1 changed file with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import javax.ws.rs.WebApplicationException;

public class InvalidLRAIdException extends WebApplicationException {
private static final long serialVersionUID = 1271422145863321852L;
private final String lraId;

/**
Expand All @@ -32,7 +33,19 @@ public class InvalidLRAIdException extends WebApplicationException {
* @param cause cause exception
*/
public InvalidLRAIdException(String lraId, String message, Throwable cause) {
super(String.format("%s, lra id: %s", message, lraId), cause);
super(String.format("%s, LRA id: %s", message, lraId), cause);

this.lraId = lraId;
}

/**
* Invalid LRA id exception.
*
* @param lraId LRA id that is behind this exception
* @param message error message of this exception
*/
public InvalidLRAIdException(String lraId, String message) {
super(String.format("%s, LRA id: %s", message, lraId));

this.lraId = lraId;
}
Expand Down

0 comments on commit 4b99e43

Please sign in to comment.