Improved error messages

This commit is contained in:
Reinhard Pointner 2017-02-04 23:21:55 +08:00
parent 97174d18bd
commit 97bdf1c910
2 changed files with 3 additions and 4 deletions

View File

@ -789,7 +789,7 @@ public class CmdlineOperations implements CmdlineInterface {
try {
downloads.put(movie, downloadSubtitle(service, subtitle, movie, outputFormat, outputEncoding, naming));
} catch (Exception e) {
log.warning(format("Failed to download %s: %s", subtitle.getPath(), e.getMessage()));
log.warning(format("Failed to download %s: %s", subtitle, e));
}
}
});

View File

@ -135,9 +135,8 @@ public class OpenSubtitlesSubtitleDescriptor implements SubtitleDescriptor, Seri
// check download quota
String quota = c.getHeaderField("Download-Quota");
if (quota != null) {
debug.finest("Download-Quota: " + quota);
setAndCheckDownloadQuota(Integer.parseInt(quota));
debug.finest(format("Download-Quota: %d", DOWNLOAD_QUOTA));
}
// read and extract subtitle data
@ -164,7 +163,7 @@ public class OpenSubtitlesSubtitleDescriptor implements SubtitleDescriptor, Seri
@Override
public String toString() {
return String.format("%s [%s]", getName(), getLanguageName());
return getPath();
}
@Override