# HG changeset patch
# User Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
# Date 1629922264 -7200
# Node ID 74e390fd739ce03e6cc6be1c04b03c3bc135becf
# Parent  6f7a836a15d62b46ba2dfac6f0c535cadfb1b738
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.

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);
 		}
 	}