nuke WalaException from CommandLine
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1957 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
This commit is contained in:
parent
a92dc921a8
commit
a5138ff7f3
|
@ -23,7 +23,6 @@ import org.eclipse.jdt.core.JavaCore;
|
|||
import com.ibm.wala.ipa.callgraph.AnalysisScope;
|
||||
import com.ibm.wala.util.debug.Assertions;
|
||||
import com.ibm.wala.util.io.CommandLine;
|
||||
import com.ibm.wala.util.warnings.WalaException;
|
||||
|
||||
public class HeadlessUtil {
|
||||
|
||||
|
@ -39,7 +38,7 @@ public class HeadlessUtil {
|
|||
System.arraycopy(cmdLine, 1, x, 0, x.length);
|
||||
try {
|
||||
p = CommandLine.parse(x);
|
||||
} catch (WalaException e) {
|
||||
} catch (IllegalArgumentException e) {
|
||||
e.printStackTrace();
|
||||
System.err.println("Length " + x.length);
|
||||
for (String s : x) {
|
||||
|
|
|
@ -12,8 +12,6 @@ package com.ibm.wala.util.io;
|
|||
|
||||
import java.util.Properties;
|
||||
|
||||
import com.ibm.wala.util.warnings.WalaException;
|
||||
|
||||
/**
|
||||
*
|
||||
* utilities for parsing a command line
|
||||
|
@ -29,7 +27,7 @@ public class CommandLine {
|
|||
*
|
||||
* @throws IllegalArgumentException if args == null
|
||||
*/
|
||||
public static Properties parse(String[] args) throws IllegalArgumentException, WalaException {
|
||||
public static Properties parse(String[] args) throws IllegalArgumentException {
|
||||
if (args == null) {
|
||||
throw new IllegalArgumentException("args == null");
|
||||
}
|
||||
|
@ -41,7 +39,7 @@ public class CommandLine {
|
|||
result.put(key, args[i].substring(args[i].indexOf('=') + 1));
|
||||
} else {
|
||||
if ((i + 1) >= args.length || args[i + 1].charAt(0) == '-') {
|
||||
throw new WalaException("Malformed command-line. Must be of form -key=value or -key value");
|
||||
throw new IllegalArgumentException("Malformed command-line. Must be of form -key=value or -key value");
|
||||
}
|
||||
result.put(key, args[i + 1]);
|
||||
i++;
|
||||
|
|
Loading…
Reference in New Issue