1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-11-16 14:25:02 -05:00

* improve MediaInfoException text

This commit is contained in:
Reinhard Pointner 2015-11-10 06:19:50 +00:00
parent 9a663ea711
commit e6dbd4538e

View File

@ -5,13 +5,13 @@ import com.sun.jna.Platform;
public class MediaInfoException extends RuntimeException { public class MediaInfoException extends RuntimeException {
public MediaInfoException(LinkageError e) { public MediaInfoException(LinkageError e) {
super(getLinkageErrorMessage(e)); super(getLinkageErrorMessage(e), e);
} }
private static String getLinkageErrorMessage(LinkageError e) { private static String getLinkageErrorMessage(LinkageError e) {
String name = Platform.isWindows() ? "MediaInfo.dll" : Platform.isMac() ? "libmediainfo.dylib" : "libmediainfo.so"; String name = Platform.isWindows() ? "MediaInfo.dll" : Platform.isMac() ? "libmediainfo.dylib" : "libmediainfo.so";
String arch = System.getProperty("os.arch").toLowerCase().trim(); String arch = System.getProperty("os.arch");
return String.format("Unable to load %s native library %s", arch, name); return String.format("Unable to load %s native library %s: %s", arch, name, e.getMessage());
} }
} }