Throwing UnknownTribbleType exception instead of CommandLineException when an unknown tribble type is specified.

This commit is contained in:
Khalid Shakir 2012-06-28 11:21:11 -04:00
parent 734bb5366b
commit 1ce0b9d519
1 changed files with 2 additions and 1 deletions

View File

@ -345,7 +345,8 @@ public abstract class ArgumentTypeDescriptor {
FeatureManager manager = new FeatureManager();
if ( manager.getByName(tribbleType) == null )
throw new UserException.CommandLineException(
throw new UserException.UnknownTribbleType(
tribbleType,
String.format("Unable to find tribble type '%s' provided on the command line. " +
"Please select a correct type from among the supported types:%n%s",
tribbleType, manager.userFriendlyListOfAvailableFeatures(parameterType)));