Add fatal to consistency and validation error enums
The code-owners plugin would like to differentiate between normal errors
and fatal errors.
Signed-off-by: Edwin Kempin <ekempin@google.com>
Change-Id: Ide55a2ba9ef84fa71604d42caf8cf02c66618ec7
(cherry picked from commit 5001718640)
This commit is contained in:
committed by
Luca Milanesio
parent
4ed924ff83
commit
21425d0d4d
@@ -1701,7 +1701,7 @@ consistency problem.
|
|||||||
|======================
|
|======================
|
||||||
|Field Name|Description
|
|Field Name|Description
|
||||||
|`status` |The status of the consistency problem. +
|
|`status` |The status of the consistency problem. +
|
||||||
Possible values are `ERROR` and `WARNING`.
|
Possible values are `FATAL`, `ERROR` and `WARNING`.
|
||||||
|`message` |Message describing the consistency problem.
|
|`message` |Message describing the consistency problem.
|
||||||
|======================
|
|======================
|
||||||
|
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ public class ConsistencyCheckInfo {
|
|||||||
|
|
||||||
public static class ConsistencyProblemInfo {
|
public static class ConsistencyProblemInfo {
|
||||||
public enum Status {
|
public enum Status {
|
||||||
|
FATAL,
|
||||||
ERROR,
|
ERROR,
|
||||||
WARNING,
|
WARNING,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import java.util.Objects;
|
|||||||
*/
|
*/
|
||||||
public class ValidationMessage {
|
public class ValidationMessage {
|
||||||
public enum Type {
|
public enum Type {
|
||||||
|
FATAL("FATAL: "),
|
||||||
ERROR("ERROR: "),
|
ERROR("ERROR: "),
|
||||||
WARNING("WARNING: "),
|
WARNING("WARNING: "),
|
||||||
HINT("hint: "),
|
HINT("hint: "),
|
||||||
@@ -70,7 +71,7 @@ public class ValidationMessage {
|
|||||||
* Returns {@true} if this message is an error. Used to decide if the operation should be aborted.
|
* Returns {@true} if this message is an error. Used to decide if the operation should be aborted.
|
||||||
*/
|
*/
|
||||||
public boolean isError() {
|
public boolean isError() {
|
||||||
return type == Type.ERROR;
|
return type == Type.FATAL || type == Type.ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user