Changeset 7808


Ignore:
Timestamp:
11/17/11 15:37:01 (8 years ago)
Author:
mario
Message:

Exit JVMLinkServer in case of invalid command-line parameters

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/legacy/jvmlink/src/main/java/loci/jvmlink/JVMLinkServer.java

    r7668 r7808  
    145145          int num = Integer.parseInt(args[i]); 
    146146          if (num < MIN_PORT || num > MAX_PORT) { 
    147             System.out.println("Invalid port: " + num); 
     147            System.err.println("Invalid port: " + num); 
     148            return; 
    148149          } 
    149150          else port = num; 
    150151        } 
    151152        catch (NumberFormatException exc) { 
    152           System.out.println("Unknown parameter: " + args[i]); 
     153          System.err.println("Unknown parameter: " + args[i]); 
     154          return; 
    153155        } 
    154156      } 
Note: See TracChangeset for help on using the changeset viewer.