Skip to content

Commit

Permalink
Turn errors into warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
timronan committed Mar 25, 2022
1 parent 2d1f1dc commit 88a4aa3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public Message evaluate(Station station) {
channel.getLongitude().getValue(), station.getLatitude().getValue(),
station.getLongitude().getValue(), "K");
if (distance > this.margin) {
nestedMessage.add(Result.error("Distance between Sta: "
nestedMessage.add(Result.warning("Distance between Sta: "
+ station.getCode() + " and Chan: " + channel.getCode() + " Loc: " + channel.getLocationCode()
+ " is expected to be less than " + margin + " km but is " + distance + " km"));
returnmessage=true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public Message evaluate(Channel channel) {
if (sampleRate.getValue() != 0) {

} else {
return Result.error("Sample rate cannot be 0 or null.");
return Result.warning("Sample rate cannot be 0 or null.");
}
} else {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public void fail() throws Exception {
SampleRateCondition condition = new SampleRateCondition(true, "");

Message result = condition.evaluate(c);
assertTrue(result instanceof edu.iris.dmc.station.rules.Error);
assertTrue(result instanceof edu.iris.dmc.station.rules.Warning);
}

}
Expand Down

0 comments on commit 88a4aa3

Please sign in to comment.