[libbluray-devel] BDJClassLoader: log class loading errors
hpi1
git at videolan.org
Sun Nov 8 19:02:31 CET 2015
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Sun Nov 8 19:37:20 2015 +0200| [fba6c0e2a6c814fb8a818b0ccafed360d4df8e42] | committer: hpi1
BDJClassLoader: log class loading errors
... to avoid debugging the same problem third time.
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=fba6c0e2a6c814fb8a818b0ccafed360d4df8e42
---
src/libbluray/bdj/java/org/videolan/BDJClassLoader.java | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/src/libbluray/bdj/java/org/videolan/BDJClassLoader.java b/src/libbluray/bdj/java/org/videolan/BDJClassLoader.java
index 733c3e5..c3f2099 100644
--- a/src/libbluray/bdj/java/org/videolan/BDJClassLoader.java
+++ b/src/libbluray/bdj/java/org/videolan/BDJClassLoader.java
@@ -126,7 +126,16 @@ public class BDJClassLoader extends URLClassLoader {
}
return c;
}
- return super.loadClass(name);
+
+ try {
+ return super.loadClass(name);
+ } catch (ClassNotFoundException e0) {
+ logger.error("ClassNotFoundException: " + name);
+ throw e0;
+ } catch (Error err) {
+ logger.error("FATAL: " + err);
+ throw err;
+ }
}
public URL getResource(String name) {
@@ -157,4 +166,6 @@ public class BDJClassLoader extends URLClassLoader {
}
private String xletClass;
+
+ private static final Logger logger = Logger.getLogger(BDJClassLoader.class.getName());
}
More information about the libbluray-devel
mailing list