Parse the command line arguments with the given options. @param opt,ions Options to parse in the given args. @param args Command line arguments to parse. @return The remainder of the command line or null if args were invalid and couldn't be parsed.
(final ArgP argp, String[] args)
| 73 | * {@code null} if {@code args} were invalid and couldn't be parsed. |
| 74 | */ |
| 75 | static String[] parse(final ArgP argp, String[] args) { |
| 76 | try { |
| 77 | args = argp.parse(args); |
| 78 | } catch (IllegalArgumentException e) { |
| 79 | System.err.println("Invalid usage. " + e.getMessage()); |
| 80 | System.exit(2); |
| 81 | } |
| 82 | honorVerboseFlag(argp); |
| 83 | return args; |
| 84 | } |
| 85 | |
| 86 | /** |
| 87 | * Attempts to load a configuration given a file or default files |