InputError(int,String,Response)   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 2
rs 10
cc 1
1
package com.base.Exceptions.Http;
2
3
import com.base.Exceptions.BaseHttpException;
4
import com.base.Http.Response.ErrorBag;
5
import com.base.Http.Response.Response;
6
7
public class InputError extends BaseHttpException {
8
9
    /**
10
     * ErrorBag
11
     */
12
    protected ErrorBag errorBag;
0 ignored issues
show
Best Practice introduced by
Exceptions generally should be immutable since they convey immutable data. Consider making the field errorBag final.
Loading history...
Bug Best Practice introduced by
Fields like errorBag in a serializable class should either be transient or serializable.
Loading history...
13
14
    /**
15
     * Construct {@link InputError} with specified code, message and response.
16
     *
17
     * @param code     Status Code
18
     * @param message  Error Messsage
19
     * @param response {@link Response}
20
     */
21
    public InputError(int code, String message, Response response) {
22
        super(code, message, response);
23
    }
24
25
    /**
26
     * Return the Value of {@link ErrorBag}
27
     *
28
     * @return ErrorBag
29
     */
30
    public ErrorBag getErrorBag() {
31
        return errorBag;
32
    }
33
34
    /**
35
     * Set {@link ErrorBag}
36
     *
37
     * @param errorBag
38
     * @return
39
     */
40
    public InputError setErrorBag(ErrorBag errorBag) {
41
        this.errorBag = errorBag;
42
        return this;
43
    }
44
}
45