1 | package com.base.Exceptions; |
||
2 | |||
3 | import com.base.Http.Response.Response; |
||
4 | |||
5 | public class BaseHttpException extends BaseException { |
||
6 | |||
7 | /** |
||
8 | * HTTP {@link Response} |
||
9 | */ |
||
10 | protected Response response; |
||
0 ignored issues
–
show
Best Practice
introduced
by
![]() |
|||
11 | |||
12 | /** |
||
13 | * Constructs {@link BaseHttpException} with the specified code,message and response |
||
14 | * @param code Status Code |
||
15 | * @param message Error Message |
||
16 | * @param response Response |
||
17 | */ |
||
18 | public BaseHttpException(int code, String message, Response response) { |
||
19 | super(code, message); |
||
20 | this.response = response; |
||
21 | } |
||
22 | |||
23 | /** |
||
24 | * Get the {@link Response} |
||
25 | * @return Response |
||
26 | */ |
||
27 | public Response getResponse() { |
||
28 | return response; |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * Construct {@link BaseHttpException} with response. |
||
33 | * @param response Response |
||
34 | * @return |
||
35 | */ |
||
36 | public BaseHttpException setResponse(Response response) { |
||
37 | this.response = response; |
||
38 | return this; |
||
39 | } |
||
40 | } |
||
41 |