From 3dd87924f14cf39315ebacd766cc2641ca68513f Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Mon, 22 Sep 2014 18:49:06 +0000 Subject: [PATCH] * simplify error logs --- source/net/filebot/media/MediaDetection.java | 14 +++++++------- source/net/filebot/web/CachedXmlResource.java | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/source/net/filebot/media/MediaDetection.java b/source/net/filebot/media/MediaDetection.java index c7ccfb9e..75e3e8a6 100644 --- a/source/net/filebot/media/MediaDetection.java +++ b/source/net/filebot/media/MediaDetection.java @@ -310,14 +310,14 @@ public class MediaDetection { names.add(it.getName()); } } catch (Exception e) { - Logger.getLogger(MediaDetection.class.getClass().getName()).log(Level.WARNING, "Failed to lookup info by id: " + e.getMessage(), e); + Logger.getLogger(MediaDetection.class.getClass().getName()).log(Level.WARNING, "Failed to lookup info by id: " + e); } // try to detect series name via known patterns try { names.addAll(matchSeriesByDirectMapping(files)); } catch (Exception e) { - Logger.getLogger(MediaDetection.class.getClass().getName()).log(Level.WARNING, "Failed to match direct mappings: " + e.getMessage(), e); + Logger.getLogger(MediaDetection.class.getClass().getName()).log(Level.WARNING, "Failed to match direct mappings: " + e); } // strict series name matcher for recognizing 1x01 patterns @@ -377,7 +377,7 @@ public class MediaDetection { names.addAll(matches); } } catch (Exception e) { - Logger.getLogger(MediaDetection.class.getClass().getName()).log(Level.WARNING, "Failed to match folder structure: " + e.getMessage(), e); + Logger.getLogger(MediaDetection.class.getClass().getName()).log(Level.WARNING, "Failed to match folder structure: " + e); } // match common word sequence and clean detected word sequence from unwanted elements @@ -425,7 +425,7 @@ public class MediaDetection { priorityMatchSet.addAll(stripReleaseInfo(matches, false)); matches = stripBlacklistedTerms(priorityMatchSet); } catch (Exception e) { - Logger.getLogger(MediaDetection.class.getClass().getName()).log(Level.WARNING, "Failed to clean matches: " + e.getMessage(), e); + Logger.getLogger(MediaDetection.class.getClass().getName()).log(Level.WARNING, "Failed to clean matches: " + e); } names.addAll(matches); @@ -460,7 +460,7 @@ public class MediaDetection { } } catch (Exception e) { // can't load movie index, just try again next time - Logger.getLogger(MediaDetection.class.getClass().getName()).log(Level.SEVERE, "Failed to load series index: " + e.getMessage(), e); + Logger.getLogger(MediaDetection.class.getClass().getName()).log(Level.SEVERE, "Failed to load series index: " + e); // rely on online search return emptyList(); @@ -482,7 +482,7 @@ public class MediaDetection { } } catch (Exception e) { // can't load movie index, just try again next time - Logger.getLogger(MediaDetection.class.getClass().getName()).log(Level.SEVERE, "Failed to load anime index: " + e.getMessage(), e); + Logger.getLogger(MediaDetection.class.getClass().getName()).log(Level.SEVERE, "Failed to load anime index: " + e); // rely on online search return emptyList(); @@ -858,7 +858,7 @@ public class MediaDetection { } } catch (Exception e) { // can't load movie index, just try again next time - Logger.getLogger(MediaDetection.class.getClass().getName()).log(Level.SEVERE, "Failed to load movie index: " + e.getMessage(), e); + Logger.getLogger(MediaDetection.class.getClass().getName()).log(Level.SEVERE, "Failed to load movie index: " + e); // if we can't use internal index we can only rely on online search return emptyList(); diff --git a/source/net/filebot/web/CachedXmlResource.java b/source/net/filebot/web/CachedXmlResource.java index be029c38..a7a81591 100644 --- a/source/net/filebot/web/CachedXmlResource.java +++ b/source/net/filebot/web/CachedXmlResource.java @@ -36,7 +36,7 @@ public class CachedXmlResource extends AbstractCachedResource { try { return WebRequest.getDocument(get()); } catch (Exception e) { - throw new IOException("Error while loading XML resource: " + e.getMessage(), e); + throw new IOException("Error while loading XML resource: " + getResourceLocation(resource)); } } @@ -52,7 +52,7 @@ public class CachedXmlResource extends AbstractCachedResource { try { reader.parse(new InputSource(new StringReader(data))); } catch (SAXException e) { - throw new IOException("Malformed XML: " + getResourceLocation(resource), e); + throw new IOException("Malformed XML: " + getResourceLocation(resource)); } return data;