1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-23 08:18:52 -05:00

* improve error messages (esp. since TheTVDB API breaks often recently)

This commit is contained in:
Reinhard Pointner 2014-09-27 15:49:38 +00:00
parent 565b951862
commit 87109b2d54

View File

@ -36,7 +36,7 @@ public class CachedXmlResource extends AbstractCachedResource<String, String> {
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<String, String> {
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;