diff --git a/source/net/filebot/ui/subtitle/SubtitleAutoMatchDialog.java b/source/net/filebot/ui/subtitle/SubtitleAutoMatchDialog.java index ce9eabfe..5c09957b 100644 --- a/source/net/filebot/ui/subtitle/SubtitleAutoMatchDialog.java +++ b/source/net/filebot/ui/subtitle/SubtitleAutoMatchDialog.java @@ -16,6 +16,7 @@ import java.awt.event.ActionEvent; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import java.io.File; +import java.io.IOException; import java.net.URI; import java.util.AbstractList; import java.util.ArrayList; @@ -445,7 +446,7 @@ class SubtitleAutoMatchDialog extends JDialog { setIcon(subtitleBean.getIcon()); setToolTipText(null); } else { - setText(String.format("%s (%s)", subtitleBean.getText(), subtitleBean.getError().getMessage())); + setText(String.format("%s (%s)", subtitleBean.getError().getMessage(), subtitleBean.getText())); setIcon(ResourceManager.getIcon("status.warning")); setToolTipText(subtitleBean.getError().toString()); } @@ -832,6 +833,10 @@ class SubtitleAutoMatchDialog extends JDialog { return destination; } catch (Exception e) { + // display error message in GUI + descriptor.error = new IOException("Failed to write file: " + e.getMessage()); + + // print to error log debug.log(Level.WARNING, e.getMessage(), e); }