Ignore:
Timestamp:
09/04/12 17:15:28 (12 years ago)
Author:
sherbold
Message:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/java-utils/src/main/java/de/ugoe/cs/util/console/CommandExecuter.java

    r749 r766  
    77import java.io.IOException; 
    88import java.net.URL; 
    9 import java.security.InvalidParameterException; 
    109import java.util.ArrayList; 
    1110import java.util.Comparator; 
     
    9392     * @param pkg 
    9493     *            package where commands are located 
    95      * @throws InvalidParameterException 
     94     * @throws IllegalArgumentException 
    9695     *             thrown if the package name is null or empty string 
    9796     */ 
    9897    public void addCommandPackage(String pkg) { 
    9998        if ("".equals(pkg) || pkg == null) { 
    100             throw new InvalidParameterException("package name must not be null or empty string"); 
     99            throw new IllegalArgumentException("package name must not be null or empty string"); 
    101100        } 
    102101        commandPackageList.add(pkg); 
     
    139138                cmd.run(parser.getParameters()); 
    140139            } 
    141             catch (InvalidParameterException e) { 
     140            catch (IllegalArgumentException e) { 
    142141                Console.println("Usage: " + cmd.help()); 
    143142            } 
Note: See TracChangeset for help on using the changeset viewer.