* improved error messages
This commit is contained in:
parent
45c773855a
commit
e3fde5f139
|
@ -5,6 +5,7 @@ package net.sourceforge.filebot.ui.rename;
|
|||
import static java.util.Collections.*;
|
||||
import static net.sourceforge.filebot.Settings.*;
|
||||
import static net.sourceforge.filebot.ui.NotificationLogging.*;
|
||||
import static net.sourceforge.tuned.ExceptionUtilities.*;
|
||||
import static net.sourceforge.tuned.ui.TunedUtilities.*;
|
||||
|
||||
import java.awt.Cursor;
|
||||
|
@ -27,7 +28,6 @@ import java.util.concurrent.Semaphore;
|
|||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.Icon;
|
||||
|
@ -271,12 +271,13 @@ class RenameAction extends AbstractAction {
|
|||
protected void done() {
|
||||
try {
|
||||
postprocess.acquire();
|
||||
} catch (InterruptedException e) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.WARNING, e.getMessage(), e);
|
||||
this.get(); // grab exception if any
|
||||
} catch (Exception e) {
|
||||
UILogger.log(Level.SEVERE, String.format("%s: %s", getRootCause(e).getClass().getSimpleName(), getRootCauseMessage(e)), e);
|
||||
}
|
||||
|
||||
// collect renamed types
|
||||
final List<Class> types = new ArrayList<Class>();
|
||||
final List<Class<?>> types = new ArrayList<Class<?>>();
|
||||
|
||||
// remove renamed matches
|
||||
for (File source : renameLog.keySet()) {
|
||||
|
@ -293,7 +294,7 @@ class RenameAction extends AbstractAction {
|
|||
HistorySpooler.getInstance().append(renameLog.entrySet());
|
||||
|
||||
// count global statistics
|
||||
for (Class it : new HashSet<Class>(types)) {
|
||||
for (Class<?> it : new HashSet<Class<?>>(types)) {
|
||||
Analytics.trackEvent("GUI", "Rename", it.getSimpleName(), frequency(types, it));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ package net.sourceforge.filebot.ui.rename;
|
|||
import static javax.swing.JOptionPane.*;
|
||||
import static javax.swing.SwingUtilities.*;
|
||||
import static net.sourceforge.filebot.ui.NotificationLogging.*;
|
||||
import static net.sourceforge.tuned.ExceptionUtilities.*;
|
||||
import static net.sourceforge.tuned.ui.LoadingOverlayPane.*;
|
||||
import static net.sourceforge.tuned.ui.TunedUtilities.*;
|
||||
|
||||
|
@ -56,7 +57,6 @@ import net.sourceforge.filebot.web.Movie;
|
|||
import net.sourceforge.filebot.web.MovieFormat;
|
||||
import net.sourceforge.filebot.web.MovieIdentificationService;
|
||||
import net.sourceforge.filebot.web.SortOrder;
|
||||
import net.sourceforge.tuned.ExceptionUtilities;
|
||||
import net.sourceforge.tuned.PreferencesMap.PreferencesEntry;
|
||||
import net.sourceforge.tuned.ui.ActionPopup;
|
||||
import net.sourceforge.tuned.ui.LoadingOverlayPane;
|
||||
|
@ -301,7 +301,6 @@ public class RenamePanel extends JComponent {
|
|||
return actionPopup;
|
||||
}
|
||||
|
||||
|
||||
protected final Action openHistoryAction = new AbstractAction("Open History", ResourceManager.getIcon("action.report")) {
|
||||
|
||||
@Override
|
||||
|
@ -450,7 +449,7 @@ public class RenamePanel extends JComponent {
|
|||
// add remaining file entries
|
||||
renameModel.files().addAll(remainingFiles);
|
||||
} catch (Exception e) {
|
||||
UILogger.log(Level.WARNING, ExceptionUtilities.getRootCauseMessage(e), e);
|
||||
UILogger.log(Level.WARNING, String.format("%s: %s", getRootCause(e).getClass().getSimpleName(), getRootCauseMessage(e)), e);
|
||||
} finally {
|
||||
// auto-match finished
|
||||
namesList.firePropertyChange(LOADING_PROPERTY, true, false);
|
||||
|
|
Loading…
Reference in New Issue