[libbluray-devel] BDLocator: log parsing errors
hpi1
git at videolan.org
Tue Apr 7 13:37:13 CEST 2015
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Tue Apr 7 14:35:25 2015 +0300| [33e3a60e45a5bac3a5702086beccdf3cd3a8bbe6] | committer: hpi1
BDLocator: log parsing errors
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=33e3a60e45a5bac3a5702086beccdf3cd3a8bbe6
---
src/libbluray/bdj/java/org/bluray/net/BDLocator.java | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/libbluray/bdj/java/org/bluray/net/BDLocator.java b/src/libbluray/bdj/java/org/bluray/net/BDLocator.java
index eb7fe43..a2808ec 100644
--- a/src/libbluray/bdj/java/org/bluray/net/BDLocator.java
+++ b/src/libbluray/bdj/java/org/bluray/net/BDLocator.java
@@ -27,11 +27,18 @@ import org.videolan.BDJUtil;
public class BDLocator extends Locator {
public BDLocator(String url) throws InvalidLocatorException {
super(url);
+ try {
+
if (!url.startsWith("bd://"))
throw new InvalidLocatorException();
String str = url.substring(5);
if (!parseJar(str) && !parseSound(str) && !parsePlaylist(str))
throw new InvalidLocatorException();
+
+ } catch (InvalidLocatorException e) {
+ System.err.println("Invalid locator: " + url);
+ throw e;
+ }
}
public BDLocator(String disc, int titleNum, int playList) throws InvalidLocatorException {
More information about the libbluray-devel
mailing list