Changeset: 74e390fd739c for monetdb-java
URL: https://dev.monetdb.org/hg/monetdb-java/rev/74e390fd739c
Modified Files:
src/main/java/org/monetdb/util/CmdLineOpts.java
Branch: default
Log Message:
Improve processing .monetdb file settings for JdbcClient program.
When an option is not recognised it no longer aborts the startup of JdbcClient
program but it is now ignored with an info message to the user.
diffs (24 lines):
diff --git a/src/main/java/org/monetdb/util/CmdLineOpts.java
b/src/main/java/org/monetdb/util/CmdLineOpts.java
--- a/src/main/java/org/monetdb/util/CmdLineOpts.java
+++ b/src/main/java/org/monetdb/util/CmdLineOpts.java
@@ -85,13 +85,15 @@ public final class CmdLineOpts {
for (java.util.Enumeration<?> e = prop.propertyNames();
e.hasMoreElements(); ) {
key = (String) e.nextElement();
option = opts.get(key);
- if (option == null)
- throw new OptionsException("Unknown
option: " + key);
- option.resetArguments();
- option.addArgument(prop.getProperty(key));
+ if (option != null) {
+ option.resetArguments();
+
option.addArgument(prop.getProperty(key));
+ } else
+ // ignore unknown options (it used to
throw an OptionsException)
+ System.out.println("Info: Ignoring
unknown/unsupported option (in " + file.getAbsolutePath() + "): " + key);
}
} catch (java.io.IOException e) {
- // well... then forget about it
+ throw new OptionsException("File IO Exception: " + e);
}
}
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list