fix error text, add exclusivity check
@@ -339,7 +339,7 @@ public class RoutesQuestionPlugin extends QuestionPlugin {
throw new BatfishException(
String.format(
"%s and %s flags are mutually exclusive",
- RoutesQuestion.PROP_AGAINST_ENVIRONMENT, RoutesQuestion.PROP_AGAINST_ENVIRONMENT));
+ RoutesQuestion.PROP_AGAINST_ENVIRONMENT, RoutesQuestion.PROP_FROM_ENVIRONMENT));
}
if (question._againstEnvironment && question._detail) {
throw new BatfishException(
@@ -347,6 +347,12 @@ public class RoutesQuestionPlugin extends QuestionPlugin {
"%s and %s flags together are currently unsupported",
RoutesQuestion.PROP_AGAINST_ENVIRONMENT, RoutesQuestion.PROP_DETAIL));
}
+ if (question._fromEnvironment && question._detail) {
+ throw new BatfishException(
+ String.format(
+ "%s and %s flags together are currently unsupported",
+ RoutesQuestion.PROP_FROM_ENVIRONMENT, RoutesQuestion.PROP_DETAIL));
+ }
Pattern nodeRegex;
try {
nodeRegex = Pattern.compile(question.getNodeRegex());
