aboutsummaryrefslogtreecommitdiffstats
path: root/services/src/main/java/org/onap/ccsdk/apps/services/RestApplicationError.java
blob: e63e1d91b06aafe3dec9642b1f5b4849b78917ba (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
31
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 RestApplicationError extends RestError {


    public RestApplicationError() {
        this.errorType = "application";
    }

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

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


}