From d3a8a9add1ce1de5a4da1d9b44dcb04e6e75cf44 Mon Sep 17 00:00:00 2001 From: Greg Messner Date: Wed, 1 May 2019 18:43:57 -0700 Subject: [PATCH] Added contructor that takes message and http status as params (#336). --- .../java/org/gitlab4j/api/GitLabApiException.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main/java/org/gitlab4j/api/GitLabApiException.java b/src/main/java/org/gitlab4j/api/GitLabApiException.java index 274f7dd1..a2ce1077 100755 --- a/src/main/java/org/gitlab4j/api/GitLabApiException.java +++ b/src/main/java/org/gitlab4j/api/GitLabApiException.java @@ -37,6 +37,18 @@ public class GitLabApiException extends Exception { this.message = message; } + /** + * Create a GitLabApiException instance with the specified message and HTTP status code. + * + * @param message the message for the exception + * @param httpStatus the HTTP status code for the exception + */ + public GitLabApiException(String message, int httpStatus) { + super(message); + this.message = message; + this.httpStatus = httpStatus; + } + /** * Create a GitLabApiException instance based on the ClientResponse. * -- GitLab