Changeset 766 for trunk/java-utils
- Timestamp:
- 09/04/12 17:15:28 (12 years ago)
- Location:
- trunk/java-utils/src/main/java/de/ugoe/cs/util/console
- Files:
-
- 3 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 } -
trunk/java-utils/src/main/java/de/ugoe/cs/util/console/defaultcommands/CMDexec.java
r664 r766 6 6 import java.io.IOException; 7 7 import java.io.InputStreamReader; 8 import java.security.InvalidParameterException;9 8 import java.util.List; 10 9 import java.util.logging.Level; … … 35 34 script = (String) parameters.get(0); 36 35 } catch (Exception e) { 37 throw new I nvalidParameterException();36 throw new IllegalArgumentException(); 38 37 } 39 38 try { -
trunk/java-utils/src/main/java/de/ugoe/cs/util/console/defaultcommands/CMDman.java
r718 r766 4 4 import java.io.IOException; 5 5 import java.io.InputStream; 6 import java.security.InvalidParameterException;7 6 import java.util.List; 8 7 … … 36 35 } 37 36 else { 38 throw new I nvalidParameterException();37 throw new IllegalArgumentException(); 39 38 } 40 39
Note: See TracChangeset
for help on using the changeset viewer.