Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/cache/CacheUtils.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/cache/CacheUtils.java	(revision 31515)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/cache/CacheUtils.java	(revision 31518)
@@ -1,4 +1,7 @@
 package org.openstreetmap.josm.plugins.mapillary.cache;
 
+import java.io.IOException;
+
+import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.cache.CacheEntry;
 import org.openstreetmap.josm.data.cache.CacheEntryAttributes;
@@ -41,5 +44,6 @@
    * in cache.
    *
-   * @param img The image to be downloaded.
+   * @param img
+   *          The image to be downloaded.
    * @param pic
    *          The picture type to be downloaded (full quality, thumbnail or
@@ -51,19 +55,35 @@
         if (new MapillaryCache(img.getKey(), MapillaryCache.Type.THUMBNAIL)
             .get() == null)
-          new MapillaryCache(img.getKey(), MapillaryCache.Type.THUMBNAIL)
-              .submit(IGNORE_DOWNLOAD, false);
+          submit(img.getKey(), MapillaryCache.Type.THUMBNAIL, IGNORE_DOWNLOAD);
         if (new MapillaryCache(img.getKey(), MapillaryCache.Type.FULL_IMAGE)
             .get() == null)
-          new MapillaryCache(img.getKey(), MapillaryCache.Type.FULL_IMAGE)
-              .submit(IGNORE_DOWNLOAD, false);
+          submit(img.getKey(), MapillaryCache.Type.FULL_IMAGE, IGNORE_DOWNLOAD);
         break;
       case THUMBNAIL:
-        new MapillaryCache(img.getKey(), MapillaryCache.Type.THUMBNAIL).submit(
-            IGNORE_DOWNLOAD, false);
+        submit(img.getKey(), MapillaryCache.Type.THUMBNAIL, IGNORE_DOWNLOAD);
         break;
       case FULL_IMAGE:
-        new MapillaryCache(img.getKey(), MapillaryCache.Type.FULL_IMAGE)
-            .submit(IGNORE_DOWNLOAD, false);
+        submit(img.getKey(), MapillaryCache.Type.FULL_IMAGE, IGNORE_DOWNLOAD);
         break;
+    }
+  }
+
+  /**
+   * Requests the picture with the given key and quality and uses the given
+   * listener.
+   *
+   * @param key
+   *          The key of the picture to be requested.
+   * @param type
+   *          The quality of the picture to be requested.
+   * @param lis
+   *          The listener that is going to receive the picture.
+   */
+  public static void submit(String key, MapillaryCache.Type type,
+      ICachedLoaderListener lis) {
+    try {
+      new MapillaryCache(key, type).submit(lis, false);
+    } catch (IOException e) {
+      Main.error(e);
     }
   }
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryMainDialog.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryMainDialog.java	(revision 31515)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryMainDialog.java	(revision 31518)
@@ -244,5 +244,9 @@
         this.thumbnailCache = new MapillaryCache(mapillaryImage.getKey(),
             MapillaryCache.Type.THUMBNAIL);
-        this.thumbnailCache.submit(this, false);
+        try {
+          this.thumbnailCache.submit(this, false);
+        } catch (IOException e) {
+          Main.error(e);
+        }
 
         // Downloads the full resolution image.
@@ -252,5 +256,9 @@
           this.imageCache = new MapillaryCache(mapillaryImage.getKey(),
               MapillaryCache.Type.FULL_IMAGE);
-          this.imageCache.submit(this, false);
+          try {
+            this.imageCache.submit(this, false);
+          } catch (IOException e) {
+            Main.error(e);
+          }
         }
       } else if (this.image instanceof MapillaryImportedImage) {
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/io/export/MapillaryExportDownloadThread.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/io/export/MapillaryExportDownloadThread.java	(revision 31515)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/io/export/MapillaryExportDownloadThread.java	(revision 31518)
@@ -14,4 +14,5 @@
 import org.openstreetmap.josm.plugins.mapillary.MapillaryAbstractImage;
 import org.openstreetmap.josm.plugins.mapillary.MapillaryImage;
+import org.openstreetmap.josm.plugins.mapillary.cache.CacheUtils;
 import org.openstreetmap.josm.plugins.mapillary.cache.MapillaryCache;
 
@@ -54,6 +55,5 @@
   @Override
   public void run() {
-    new MapillaryCache(this.image.getKey(), MapillaryCache.Type.FULL_IMAGE)
-        .submit(this, false);
+    CacheUtils.submit(this.image.getKey(), MapillaryCache.Type.FULL_IMAGE, this);
   }
 
