Changeset 766 for trunk/java-utils/src


Ignore:
Timestamp:
09/04/12 17:15:28 (12 years ago)
Author:
sherbold
Message:
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  
    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            } 
  • trunk/java-utils/src/main/java/de/ugoe/cs/util/console/defaultcommands/CMDexec.java

    r664 r766  
    66import java.io.IOException; 
    77import java.io.InputStreamReader; 
    8 import java.security.InvalidParameterException; 
    98import java.util.List; 
    109import java.util.logging.Level; 
     
    3534                        script = (String) parameters.get(0); 
    3635                } catch (Exception e) { 
    37                         throw new InvalidParameterException(); 
     36                        throw new IllegalArgumentException(); 
    3837                } 
    3938                try { 
  • trunk/java-utils/src/main/java/de/ugoe/cs/util/console/defaultcommands/CMDman.java

    r718 r766  
    44import java.io.IOException; 
    55import java.io.InputStream; 
    6 import java.security.InvalidParameterException; 
    76import java.util.List; 
    87 
     
    3635        } 
    3736        else { 
    38             throw new InvalidParameterException(); 
     37            throw new IllegalArgumentException(); 
    3938        } 
    4039 
Note: See TracChangeset for help on using the changeset viewer.