* simplify mediainfo error messages

This commit is contained in:
Reinhard Pointner 2015-06-19 10:00:33 +00:00
parent 997c2efec6
commit 745ac54c16
2 changed files with 10 additions and 10 deletions

View File

@ -29,7 +29,7 @@ public class MediaInfo implements Closeable {
NativeLibrary.getInstance("zen"); NativeLibrary.getInstance("zen");
} }
} catch (Throwable e) { } catch (Throwable e) {
// Logger.getLogger(MediaInfo.class.getName()).warning("Failed to preload libzen"); // Logger.getLogger(MediaInfo.class.getName()).log(Level.WARNING, "Failed to load libzen");
} }
} }
@ -39,7 +39,7 @@ public class MediaInfo implements Closeable {
try { try {
handle = MediaInfoLibrary.INSTANCE.New(); handle = MediaInfoLibrary.INSTANCE.New();
} catch (LinkageError e) { } catch (LinkageError e) {
throw new MediaInfoException(e); throw new MediaInfoException();
} }
} }

View File

@ -1,19 +1,19 @@
package net.filebot.mediainfo; package net.filebot.mediainfo;
import com.sun.jna.Platform; import com.sun.jna.Platform;
public class MediaInfoException extends RuntimeException { public class MediaInfoException extends RuntimeException {
public MediaInfoException(LinkageError e) { public MediaInfoException() {
this(String.format("Unable to load %d-bit native library 'mediainfo'", Platform.is64Bit() ? 64 : 32), e); super(String.format("Unable to load %d-bit native library 'mediainfo'", Platform.is64Bit() ? 64 : 32));
}
public MediaInfoException(LinkageError e) {
super(String.format("Unable to load %d-bit native library 'mediainfo'", Platform.is64Bit() ? 64 : 32), e);
} }
public MediaInfoException(String msg, Throwable e) { public MediaInfoException(String msg, Throwable e) {
super(msg, e); super(msg, e);
} }
} }