mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-24 00:38:52 -05:00
* improve MediaInfoException text
This commit is contained in:
parent
9a663ea711
commit
e6dbd4538e
@ -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());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user