aboutsummaryrefslogtreecommitdiffstats
path: root/services/src/main/java/org/onap/ccsdk/apps/services/RestProtocolError.java
blob: 2e927b6a06f8212bbd7e83de8aef01f44da84dbf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package org.onap.ccsdk.apps.services;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonRootName;
import com.fasterxml.jackson.annotation.JsonValue;


@JsonRootName(value="error")
public class RestProtocolError extends RestError {


    public RestProtocolError() {
        this.errorType = "protocol";
    }

    public RestProtocolError(String errorTag, String errorMessage) {
        this.errorType = "protocol";
        this.errorTag = errorTag;
        this.errorMessage = errorMessage;
        this.errorInfo = errorMessage;
    }

    public RestProtocolError(String errorTag, String errorMessage, Throwable t) {
        this.errorType = "protocol";
        this.errorTag = errorTag;
        this.errorMessage = errorMessage;
        this.errorInfo = t.getLocalizedMessage();
    }

}