Need to print out all throwables, otherise the FX View may swallow errors
authorJaroslav Tulach <jaroslav.tulach@apidesign.org>
Sat, 31 Aug 2013 17:06:18 +0000
changeset 277285765af17f0
parent 276 a8663166a8d1
child 278 96d0e3799ba2
Need to print out all throwables, otherise the FX View may swallow errors
boot/src/main/java/net/java/html/boot/BrowserBuilder.java
     1.1 --- a/boot/src/main/java/net/java/html/boot/BrowserBuilder.java	Sat Aug 31 11:57:42 2013 +0000
     1.2 +++ b/boot/src/main/java/net/java/html/boot/BrowserBuilder.java	Sat Aug 31 17:06:18 2013 +0000
     1.3 @@ -198,20 +198,20 @@
     1.4                              onLoad.run();
     1.5                          }
     1.6                          INIT: if (methodName != null) {
     1.7 -                            Exception firstError = null;
     1.8 +                            Throwable firstError = null;
     1.9                              if (methodArgs.length == 0) {
    1.10                                  try {
    1.11                                      Method m = newClazz.getMethod(methodName);
    1.12                                      m.invoke(null);
    1.13                                      break INIT;
    1.14 -                                } catch (Exception ex) {
    1.15 +                                } catch (Throwable ex) {
    1.16                                      firstError = ex;
    1.17                                  }
    1.18                              }
    1.19                              try {
    1.20                                  Method m = newClazz.getMethod(methodName, String[].class);
    1.21                                  m.invoke(m, (Object) methodArgs);
    1.22 -                            } catch (Exception ex) {
    1.23 +                            } catch (Throwable ex) {
    1.24                                  if (firstError != null) {
    1.25                                      LOG.log(Level.SEVERE, "Can't call " + methodName, firstError);
    1.26                                  }