From dc079a9d134199da89c204648f1c3d1619c0876c Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Fri, 4 Nov 2011 08:07:49 +0000 Subject: [PATCH] * improved error messages --- .../net/sourceforge/filebot/ui/rename/RenameAction.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/net/sourceforge/filebot/ui/rename/RenameAction.java b/source/net/sourceforge/filebot/ui/rename/RenameAction.java index 0e1e1441..89ca4bd4 100644 --- a/source/net/sourceforge/filebot/ui/rename/RenameAction.java +++ b/source/net/sourceforge/filebot/ui/rename/RenameAction.java @@ -101,14 +101,15 @@ class RenameAction extends AbstractAction { } if (renameMap.containsKey(source)) - throw new IllegalArgumentException("Duplicate source file: " + source); + throw new IllegalArgumentException("Duplicate source file: " + source.getName()); if (destinationSet.contains(destination)) - throw new IllegalArgumentException("Conflict detected: " + destination); + throw new IllegalArgumentException("Conflict detected: " + mapping.getValue()); if (destination.exists() && !source.equals(destination)) - throw new IllegalArgumentException("File already exists: " + destination); + throw new IllegalArgumentException("File already exists: " + mapping.getValue()); + // use original mapping values renameMap.put(mapping.getKey(), mapping.getValue()); } @@ -157,7 +158,6 @@ class RenameAction extends AbstractAction { final ProgressDialog dialog = new ProgressDialog(parent, job); // configure dialog - dialog.setTitle("Renaming..."); dialog.setTitle("Moving files..."); dialog.setIcon((Icon) getValue(SMALL_ICON));