git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-629 Fix missing icon for command line launch
[jalview.git]
/
src
/
jalview
/
bin
/
argparser
/
ArgParser.java
diff --git
a/src/jalview/bin/argparser/ArgParser.java
b/src/jalview/bin/argparser/ArgParser.java
index
4e1793d
..
6d1251c
100644
(file)
--- a/
src/jalview/bin/argparser/ArgParser.java
+++ b/
src/jalview/bin/argparser/ArgParser.java
@@
-283,9
+283,15
@@
public class ArgParser
Arg potentialArg = argMap.get(potentialArgName);
if (potentialArg != null && potentialArg.hasOption(Opt.HASTYPE))
{
Arg potentialArg = argMap.get(potentialArgName);
if (potentialArg != null && potentialArg.hasOption(Opt.HASTYPE))
{
- argName = argName.substring(0, dashPos);
String typeName = argName.substring(dashPos + 1);
String typeName = argName.substring(dashPos + 1);
- type = Type.valueOf(typeName);
+ try
+ {
+ type = Type.valueOf(typeName);
+ } catch (IllegalArgumentException e)
+ {
+ type = Type.INVALID;
+ }
+ argName = argName.substring(0, dashPos);
}
}
}
}