Index: applications/editors/josm/plugins/agpifoj/build.xml
===================================================================
--- applications/editors/josm/plugins/agpifoj/build.xml	(revision 18286)
+++ applications/editors/josm/plugins/agpifoj/build.xml	(revision 18287)
@@ -34,5 +34,5 @@
                 <attribute name="Plugin-Early" value="false"/>
                 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/AgPifoJ"/>
-                <attribute name="Plugin-Mainversion" value="2166"/>
+                <attribute name="Plugin-Mainversion" value="2322"/>
                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
             </manifest>
Index: applications/editors/josm/plugins/agpifoj/src/org/openstreetmap/josm/plugins/agpifoj/AgpifojLayer.java
===================================================================
--- applications/editors/josm/plugins/agpifoj/src/org/openstreetmap/josm/plugins/agpifoj/AgpifojLayer.java	(revision 18286)
+++ applications/editors/josm/plugins/agpifoj/src/org/openstreetmap/josm/plugins/agpifoj/AgpifojLayer.java	(revision 18287)
@@ -21,8 +21,10 @@
 import java.util.Date;
 import java.util.HashSet;
+import java.util.LinkedHashSet;
 import java.util.List;
 
 import javax.swing.Icon;
 import javax.swing.JMenuItem;
+import javax.swing.JOptionPane;
 import javax.swing.JSeparator;
 
@@ -102,9 +104,14 @@
         private final File[] selection;
         private HashSet<String> loadedDirectories = new HashSet<String>();
-        private String errorMessage = "";
-
+        private LinkedHashSet<String> errorMessages;
+
+        protected void rememberError(String message) {
+        	this.errorMessages.add(message);
+        }
+        
         public Loader(File[] selection) {
             super(tr("Extracting GPS locations from EXIF"));
             this.selection = selection;
+            errorMessages = new LinkedHashSet<String>(); 
         }
 
@@ -115,6 +122,6 @@
             try {
                 addRecursiveFiles(files, selection);
-            } catch(NullPointerException npe) {
-                errorMessage += tr("One of the selected files was null !!!");
+            } catch(NullPointerException npe) {            	
+                rememberError(tr("One of the selected files was null"));
             }
 
@@ -156,7 +163,4 @@
             layer = new AgpifojLayer(data);
             files.clear();
-            if (errorMessage != null && ! errorMessage.trim().equals("")) {
-            	progressMonitor.setErrorMessage(errorMessage);
-            }
         }
 
@@ -179,6 +183,6 @@
                     } catch (IOException e) {
                         e.printStackTrace();
-                        errorMessage += tr("Unable to get canonical path for directory {0}\n",
-                                           f.getAbsolutePath());
+                        rememberError(tr("Unable to get canonical path for directory {0}\n",
+                                           f.getAbsolutePath()));
                     }
 
@@ -196,8 +200,9 @@
                         } catch(NullPointerException npe) {
                             npe.printStackTrace();
-                            errorMessage += tr("Found null file in directory {0}\n", f.getPath());
+                            
+                            rememberError(tr("Found null file in directory {0}\n", f.getPath()));
                         }
                     } else {
-                    	errorMessage += tr("Error while getting files from directory {0}\n", f.getPath());
+                    	rememberError(tr("Error while getting files from directory {0}\n", f.getPath()));
                     }
 
@@ -212,5 +217,29 @@
         }
 
+        protected String formatErrorMessages() {
+        	StringBuffer sb = new StringBuffer();
+        	sb.append("<html>");
+    		if (errorMessages.size() == 1) {
+    			sb.append(errorMessages.iterator().next());
+    		} else {
+    			sb.append("<ul>");
+    			for (String msg: errorMessages) {
+    				sb.append("<li>").append(msg).append("</li>");
+    			}
+    			sb.append("/ul>");
+    		}
+    		sb.append("</html>");
+    		return sb.toString();
+        }
+        
         @Override protected void finish() {
+        	if (!errorMessages.isEmpty()) {
+        		JOptionPane.showMessageDialog(
+        				Main.parent,
+        				formatErrorMessages(),
+        				tr("Error"),
+        				JOptionPane.ERROR_MESSAGE
+        		);
+        	}
             if (layer != null) {
                 Main.main.addLayer(layer);
