From 87109b2d5490e69135905b5807730e45f4eaae2f Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Sat, 27 Sep 2014 15:49:38 +0000 Subject: [PATCH] * improve error messages (esp. since TheTVDB API breaks often recently) --- source/net/filebot/web/CachedXmlResource.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/net/filebot/web/CachedXmlResource.java b/source/net/filebot/web/CachedXmlResource.java index a7a81591..ec8b0f6c 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: " + getResourceLocation(resource)); + throw new IOException(String.format("Error while loading XML resource: %s (%s)", getResourceLocation(resource), e.getMessage())); } } @@ -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)); + throw new IOException(String.format("Malformed XML: %s (%s)", getResourceLocation(resource), e.getMessage())); } return data;