blob: 0764a56451c7a72d4cd7bc1f261533a9b70ff31e (
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
32
33
34
35
36
37
38
39
40
41
42
43
|
package org.onap.sdc.dcae.checker;
/**
* A target error represents an error in target the resource being checked.
* We only represent it as a Throwable because the libraries that perform parsing and syntax validation
* represent their errors as such ..
*/
public class TargetError extends Throwable {
/*
public static enum Level {
error,
warning
}
*/
private String location; //we might need an more detailed representation
//here: it could be a YAML document jpath or
//document location (line).
private String target;
public TargetError(String theTarget, String theLocation, String theMessage, Throwable theCause) {
super(theMessage, theCause);
this.target = theTarget;
this.location = theLocation;
}
public TargetError(String theTarget, String theLocation, String theMessage) {
this(theTarget, theLocation, theMessage, null);
}
public String getTarget() {
return this.target;
}
public String getLocation() {
return this.location;
}
}
|