This is an automated email from the ASF dual-hosted git repository.
jtulach pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-netbeans-html4j.git
The following commit(s) were added to refs/heads/master by this push:
new 61fab0b More explicit report of the missing resource page
61fab0b is described below
commit 61fab0b3e1306dc3ef4876af62c8c031f7eec68b
Author: Jaroslav Tulach <[email protected]>
AuthorDate: Fri Jan 26 04:47:03 2018 +0100
More explicit report of the missing resource page
---
.../main/java/org/netbeans/html/boot/fx/AbstractFXPresenter.java | 6 +++++-
boot/src/main/java/net/java/html/boot/BrowserBuilder.java | 3 +++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git
a/boot-fx/src/main/java/org/netbeans/html/boot/fx/AbstractFXPresenter.java
b/boot-fx/src/main/java/org/netbeans/html/boot/fx/AbstractFXPresenter.java
index 53dce08..fc99d40 100644
--- a/boot-fx/src/main/java/org/netbeans/html/boot/fx/AbstractFXPresenter.java
+++ b/boot-fx/src/main/java/org/netbeans/html/boot/fx/AbstractFXPresenter.java
@@ -171,7 +171,11 @@ Fn.KeepAlive, Fn.ToJavaScript, Fn.FromJavaScript,
Executor, Cloneable {
}
}
}
- engine.load(resource.toExternalForm());
+ try {
+ engine.load(resource.toExternalForm());
+ } catch (RuntimeException ex) {
+ LOG.log(Level.SEVERE, "Cannot load resource " + resource,
ex);
+ }
}
}
Run run = new Run();
diff --git a/boot/src/main/java/net/java/html/boot/BrowserBuilder.java
b/boot/src/main/java/net/java/html/boot/BrowserBuilder.java
index ccbf609..e534184 100644
--- a/boot/src/main/java/net/java/html/boot/BrowserBuilder.java
+++ b/boot/src/main/java/net/java/html/boot/BrowserBuilder.java
@@ -232,6 +232,9 @@ public final class BrowserBuilder {
}
IOException mal[] = { null };
URL url = findLocalizedResourceURL(resource, locale, mal, myCls);
+ if (url == null) {
+ throw new NullPointerException("Cannot find page " + resource + "
to display");
+ }
Fn.Presenter dfnr = null;
for (Object o : context) {
--
To stop receiving notification emails like this one, please contact
[email protected].
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists