* 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
1 changed files with 2 additions and 2 deletions

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;