* simplify mediainfo error messages
This commit is contained in:
parent
997c2efec6
commit
745ac54c16
|
@ -29,7 +29,7 @@ public class MediaInfo implements Closeable {
|
|||
NativeLibrary.getInstance("zen");
|
||||
}
|
||||
} 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 {
|
||||
handle = MediaInfoLibrary.INSTANCE.New();
|
||||
} catch (LinkageError e) {
|
||||
throw new MediaInfoException(e);
|
||||
throw new MediaInfoException();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
|
||||
package net.filebot.mediainfo;
|
||||
|
||||
|
||||
import com.sun.jna.Platform;
|
||||
|
||||
|
||||
public class MediaInfoException extends RuntimeException {
|
||||
|
||||
public MediaInfoException(LinkageError e) {
|
||||
this(String.format("Unable to load %d-bit native library 'mediainfo'", Platform.is64Bit() ? 64 : 32), e);
|
||||
|
||||
public MediaInfoException() {
|
||||
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) {
|
||||
super(msg, e);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue