changeset 1028:e2adee0f28ea

Making loading of PAC provider more lenient * netx/net/sourceforge/jnlp/runtime/PacEvaluatorFactory.java: (getPacEvaluator) changed general Exception (instead IOException only) is catch
author Jiri Vanek <jvanek@redhat.com>
date Fri, 14 Nov 2014 14:16:24 +0100
parents 1ea6ae497d63
children e8dcd9718b5b
files ChangeLog netx/net/sourceforge/jnlp/runtime/PacEvaluatorFactory.java
diffstat 2 files changed, 10 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Nov 10 13:28:12 2014 +0100
+++ b/ChangeLog	Fri Nov 14 14:16:24 2014 +0100
@@ -1,3 +1,9 @@
+2014-11-14  Jiri Vanek  <jvanek@redhat.com>
+
+	Making loading of PAC provider more lenient
+	* netx/net/sourceforge/jnlp/runtime/PacEvaluatorFactory.java: (getPacEvaluator)
+	changed general Exception (instead IOException only) is catch.
+
 2014-11-10  Jiri Vanek  <jvanek@redhat.com>
 
 	Added CZ and DE translation for CertWarningDialog messages
--- a/netx/net/sourceforge/jnlp/runtime/PacEvaluatorFactory.java	Mon Nov 10 13:28:12 2014 +0100
+++ b/netx/net/sourceforge/jnlp/runtime/PacEvaluatorFactory.java	Fri Nov 14 14:16:24 2014 +0100
@@ -37,7 +37,6 @@
 
 package net.sourceforge.jnlp.runtime;
 
-import java.io.IOException;
 import java.io.InputStream;
 import java.lang.reflect.Constructor;
 import java.lang.reflect.InvocationTargetException;
@@ -60,12 +59,14 @@
         try {
             properties = new Properties();
             properties.load(in);
-        } catch (IOException e) {
+        } catch (Exception e) {
+            OutputController.getLogger().log(OutputController.Level.WARNING_ALL, "PAC provider is broken or don't exists. This is ok unless your application is using JavaScript.");
             OutputController.getLogger().log(e);
         } finally {
             try {
                 in.close();
-            } catch (IOException e) {
+            } catch (Exception e) {
+                OutputController.getLogger().log(OutputController.Level.WARNING_ALL, "PAC provider is broken or don't exists. This is ok unless your application is using JavaScript.");
                 OutputController.getLogger().log(e);
             }
         }