1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-21 23:38:50 -05:00

* better exception logging

This commit is contained in:
Reinhard Pointner 2008-02-15 20:58:09 +00:00
parent 9053df6316
commit 456a14e7ce
6 changed files with 7 additions and 8 deletions

View File

@ -65,7 +65,7 @@ public class AnidbClient extends EpisodeListClient {
cache.put(title, url);
shows.add(title);
} catch (MalformedURLException e) {
Logger.getLogger(Logger.GLOBAL_LOGGER_NAME).log(Level.WARNING, "Invalid href: " + href, e);
Logger.getLogger(Logger.GLOBAL_LOGGER_NAME).log(Level.WARNING, "Invalid href: " + href);
}
}
}

View File

@ -147,7 +147,7 @@ public class DownloadTask extends SwingWorker<ByteBuffer, Object> {
sb.append(URLEncoder.encode(parameters.get(key), "UTF-8"));
} catch (UnsupportedEncodingException e) {
// will never happen
Logger.getLogger(Logger.GLOBAL_LOGGER_NAME).log(Level.WARNING, e.getMessage(), e);
Logger.getLogger(Logger.GLOBAL_LOGGER_NAME).log(Level.SEVERE, e.getMessage(), e);
}
i++;

View File

@ -41,7 +41,7 @@ public class ImdbSearchEngine {
try {
movies.add(parseMovieNode(node));
} catch (Exception e) {
Logger.getLogger(Logger.GLOBAL_LOGGER_NAME).log(Level.WARNING, "Cannot parse movie node", e);
Logger.getLogger(Logger.GLOBAL_LOGGER_NAME).log(Level.WARNING, "Cannot parse movie node");
}
}

View File

@ -50,7 +50,7 @@ public class OpenSubtitleDescriptor {
try {
return new URL(link);
} catch (MalformedURLException e) {
Logger.getLogger(Logger.GLOBAL_LOGGER_NAME).log(Level.WARNING, "Invalid download link: " + link, e);
Logger.getLogger(Logger.GLOBAL_LOGGER_NAME).log(Level.WARNING, "Invalid download link: " + link);
return null;
}
}

View File

@ -139,7 +139,7 @@ public class OpenSubtitlesClient {
Map<String, String> response = (Map<String, String>) invoke("LogOut", token);
checkStatus(response.get("status"));
} catch (Exception e) {
Logger.getLogger(Logger.GLOBAL_LOGGER_NAME).log(Level.WARNING, "Exception while deactivating connection", e);
Logger.getLogger(Logger.GLOBAL_LOGGER_NAME).log(Level.SEVERE, "Exception while deactivating connection", e);
}
}
@ -180,7 +180,7 @@ public class OpenSubtitlesClient {
return rpc.invoke(method, arguments);
} catch (MalformedURLException e) {
// will never happen
Logger.getLogger(Logger.GLOBAL_LOGGER_NAME).log(Level.WARNING, "Invalid xml-rpc url: " + url, e);
Logger.getLogger(Logger.GLOBAL_LOGGER_NAME).log(Level.SEVERE, "Invalid xml-rpc url: " + url, e);
return null;
}
}

View File

@ -2,7 +2,6 @@
package net.sourceforge.filebot.web;
import java.io.UnsupportedEncodingException;
import java.net.URL;
import java.util.Map;
@ -54,7 +53,7 @@ public class SubsceneSubtitleDescriptor {
}
public DownloadTask createDownloadTask() throws UnsupportedEncodingException {
public DownloadTask createDownloadTask() {
return new DownloadTask(downloadUrl, downloadParameters);
}