From 745ac54c1697d76d08631034d5152b6155829c9f Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Fri, 19 Jun 2015 10:00:33 +0000 Subject: [PATCH] * simplify mediainfo error messages --- source/net/filebot/mediainfo/MediaInfo.java | 4 ++-- .../filebot/mediainfo/MediaInfoException.java | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/source/net/filebot/mediainfo/MediaInfo.java b/source/net/filebot/mediainfo/MediaInfo.java index e13dc592..2d59e530 100644 --- a/source/net/filebot/mediainfo/MediaInfo.java +++ b/source/net/filebot/mediainfo/MediaInfo.java @@ -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(); } } diff --git a/source/net/filebot/mediainfo/MediaInfoException.java b/source/net/filebot/mediainfo/MediaInfoException.java index 116cbba6..0f6452ba 100644 --- a/source/net/filebot/mediainfo/MediaInfoException.java +++ b/source/net/filebot/mediainfo/MediaInfoException.java @@ -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); } - + }