diff --git a/src/org/openstreetmap/josm/gui/MapView.java b/src/org/openstreetmap/josm/gui/MapView.java
index 57e1776..f541bad 100644
--- a/src/org/openstreetmap/josm/gui/MapView.java
+++ b/src/org/openstreetmap/josm/gui/MapView.java
@@ -74,6 +74,7 @@ import org.openstreetmap.josm.gui.util.GuiHelper;
 import org.openstreetmap.josm.tools.AudioPlayer;
 import org.openstreetmap.josm.tools.Shortcut;
 import org.openstreetmap.josm.tools.Utils;
+import org.openstreetmap.josm.tools.bugreport.BugReport;
 import org.openstreetmap.josm.tools.bugreport.BugReportExceptionHandler;
 
 /**
@@ -732,11 +733,15 @@ LayerManager.LayerChangeListener, MainLayerManager.ActiveLayerChangeListener {
     }
 
     private void paintLayer(Layer layer, Graphics2D g, Bounds box) {
-        if (layer.getOpacity() < 1) {
-            g.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, (float) layer.getOpacity()));
+        try {
+            if (layer.getOpacity() < 1) {
+                g.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, (float) layer.getOpacity()));
+            }
+            layer.paint(g, this, box);
+            g.setPaintMode();
+        } catch (RuntimeException t) {
+            throw BugReport.intercept(t).put("layer", layer).put("bounds", box);
         }
-        layer.paint(g, this, box);
-        g.setPaintMode();
     }
 
     /**
diff --git a/src/org/openstreetmap/josm/tools/bugreport/BugReport.java b/src/org/openstreetmap/josm/tools/bugreport/BugReport.java
new file mode 100644
index 0000000..1ec9eac
--- /dev/null
+++ b/src/org/openstreetmap/josm/tools/bugreport/BugReport.java
@@ -0,0 +1,78 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.tools.bugreport;
+
+/**
+ * This class contains utility methods to create and handle a bug report.
+ * <p>
+ * It allows you to configure the format and request to send the bug report.
+ * <p>
+ * It also contains the main entry point for all components to use the bug report system: Call {@link #intercept(Throwable)} to start handling an
+ * exception.
+ * <h1> Handling Exceptions </h1>
+ * In your code, you should add try...catch blocks for any runtime exceptions that might happen. It is fine to catch throwable there.
+ * <p>
+ * You should then add some debug information there. This can be the OSM ids that caused the error, information on the data you were working on
+ * or other local variables. Make sure that no excpetions may occur while computing the values. It is best to send plain local variables to
+ * put(...). Then simply throw the throwable you got from the bug report. The global exception handler will do the rest.
+ * <pre>
+ * int id = ...;
+ * String tag = "...";
+ * try {
+ *   ... your code ...
+ * } catch (Throwable t) {
+ *   throw BugReport.intercept(t).put("id", id).put("tag", tag);
+ * }
+ * </pre>
+ *
+ * Instead of re-throwing, you can call {@link ReportedException#warn()}. This will display a warning to the user and allow it to either report
+ * the execption or ignore it.
+ *
+ * @author Michael Zangl
+ * @since xxx
+ */
+public class BugReport {
+    /**
+     * Create a new bug report
+     * @param e The {@link ReportedException} to use. No more data should be added after creating the report.
+     */
+    public BugReport(ReportedException e) {
+        // TODO: Use this class to create the bug report.
+    }
+
+    /**
+     * This should be called whenever you want to add more information to a given exception.
+     * @param t The throwable that was thrown.
+     * @return A {@link ReportedException} to which you can add additional information.
+     */
+    public static ReportedException intercept(Throwable t) {
+        ReportedException e;
+        if (t instanceof ReportedException) {
+            e = (ReportedException) t;
+        } else {
+            e = new ReportedException(t);
+        }
+        e.startSection(getCallingMethod(2));
+        return e;
+    }
+
+    /**
+     * Find the method that called us.
+     *
+     * @param offset
+     *            How many methods to look back in the stack trace. 1 gives the method calling this method, 0 gives you getCallingMethod().
+     * @return The method name.
+     */
+    static String getCallingMethod(int offset) {
+        StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();
+        String className = BugReport.class.getName();
+        for (int i = 0; i < stackTrace.length - offset; i++) {
+            StackTraceElement element = stackTrace[i];
+            if (className.equals(element.getClassName()) && "getCallingMethod".equals(element.getMethodName())) {
+                StackTraceElement toReturn = stackTrace[i + offset];
+                return toReturn.getClassName().replaceFirst(".*\\.", "") + "#" + toReturn.getMethodName();
+            }
+        }
+        return "?";
+    }
+
+}
diff --git a/src/org/openstreetmap/josm/tools/bugreport/BugReportExceptionHandler.java b/src/org/openstreetmap/josm/tools/bugreport/BugReportExceptionHandler.java
index 69da833..054eca0 100644
--- a/src/org/openstreetmap/josm/tools/bugreport/BugReportExceptionHandler.java
+++ b/src/org/openstreetmap/josm/tools/bugreport/BugReportExceptionHandler.java
@@ -197,7 +197,14 @@ public final class BugReportExceptionHandler implements Thread.UncaughtException
 
     static JPanel buildPanel(final Throwable e) {
         StringWriter stack = new StringWriter();
-        e.printStackTrace(new PrintWriter(stack));
+        PrintWriter writer = new PrintWriter(stack);
+        if (e instanceof ReportedException) {
+            // Temporary!
+            ((ReportedException) e).printReportDataTo(writer);
+            ((ReportedException) e).printReportStackTo(writer);
+        } else {
+            e.printStackTrace(writer);
+        }
 
         String text = ShowStatusReportAction.getReportHeader() + stack.getBuffer().toString();
         text = text.replaceAll("\r", "");
