Skip to content

Commit d3a8a9a

Browse files
committed
Added contructor that takes message and http status as params (#336).
1 parent 4f74251 commit d3a8a9a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/main/java/org/gitlab4j/api/GitLabApiException.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,18 @@ public GitLabApiException(String message) {
3737
this.message = message;
3838
}
3939

40+
/**
41+
* Create a GitLabApiException instance with the specified message and HTTP status code.
42+
*
43+
* @param message the message for the exception
44+
* @param httpStatus the HTTP status code for the exception
45+
*/
46+
public GitLabApiException(String message, int httpStatus) {
47+
super(message);
48+
this.message = message;
49+
this.httpStatus = httpStatus;
50+
}
51+
4052
/**
4153
* Create a GitLabApiException instance based on the ClientResponse.
4254
*

0 commit comments

Comments
 (0)