1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-23 16:28:51 -05:00

Throw exception if result is null (shouldn't happen unless cache/etag is out of sync)

This commit is contained in:
Reinhard Pointner 2016-04-09 22:08:34 +00:00
parent 2fac737052
commit 397fb14be7

View File

@ -85,6 +85,10 @@ public class CachedResource<K, R> implements Resource<R> {
return element.getObjectValue();
}
if (data == null) {
throw new IllegalStateException(String.format("Response data is null: %s => %s", key, url));
}
return parse.transform(data);
} catch (IOException e) {
debug.warning(format("Fetch failed: %s", e.getMessage()));