- Timestamp:
- 09/04/12 17:15:28 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/java-utils/src/main/java/de/ugoe/cs/util/console/CommandExecuter.java
r749 r766 7 7 import java.io.IOException; 8 8 import java.net.URL; 9 import java.security.InvalidParameterException;10 9 import java.util.ArrayList; 11 10 import java.util.Comparator; … … 93 92 * @param pkg 94 93 * package where commands are located 95 * @throws I nvalidParameterException94 * @throws IllegalArgumentException 96 95 * thrown if the package name is null or empty string 97 96 */ 98 97 public void addCommandPackage(String pkg) { 99 98 if ("".equals(pkg) || pkg == null) { 100 throw new I nvalidParameterException("package name must not be null or empty string");99 throw new IllegalArgumentException("package name must not be null or empty string"); 101 100 } 102 101 commandPackageList.add(pkg); … … 139 138 cmd.run(parser.getParameters()); 140 139 } 141 catch (I nvalidParameterException e) {140 catch (IllegalArgumentException e) { 142 141 Console.println("Usage: " + cmd.help()); 143 142 }
Note: See TracChangeset
for help on using the changeset viewer.