diff --git a/src/org/openstreetmap/josm/actions/MergeNodesAction.java b/src/org/openstreetmap/josm/actions/MergeNodesAction.java
index 63f36d6..5118068 100644
--- a/src/org/openstreetmap/josm/actions/MergeNodesAction.java
+++ b/src/org/openstreetmap/josm/actions/MergeNodesAction.java
@@ -214,10 +214,9 @@ public class MergeNodesAction extends JosmAction {
                     };
                     HelpAwareOptionPane.showOptionDialog(
                             Main.parent,
-                            tr(
-                                    "Cannot merge nodes: Would have to delete way ''{0}'' which is still used.",
-                                    w.getDisplayName(DefaultNameFormatter.getInstance())
-                            ),
+                            tr("Cannot merge nodes: Would have to delete way {0} which is still used by {1}",
+                                DefaultNameFormatter.getInstance().formatAsHtmlUnorderedList(w),
+                                DefaultNameFormatter.getInstance().formatAsHtmlUnorderedList(w.getReferrers())),
                             tr("Warning"),
                             JOptionPane.WARNING_MESSAGE,
                             null, /* no icon */
diff --git a/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTaskList.java b/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTaskList.java
index 5a98e40..8eaac96 100644
--- a/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTaskList.java
+++ b/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTaskList.java
@@ -159,19 +159,20 @@ public class DownloadOsmTaskList {
                                 ),
         };
 
-        String message = "<html>"
-                + trn("There is {0} object in your local dataset which "
-                        + "might be deleted on the server. If you later try to delete or "
-                        + "update this the server is likely to report a conflict.",
-                        "There are {0} objects in your local dataset which "
-                                + "might be deleted on the server. If you later try to delete or "
-                                + "update them the server is likely to report a conflict.", potentiallyDeleted.size(), potentiallyDeleted.size())
-                                + "<br>"
-                                + trn("Click <strong>{0}</strong> to check the state of this object on the server.",
-                                        "Click <strong>{0}</strong> to check the state of these objects on the server.",
-                                        potentiallyDeleted.size(),
-                                        options[0].text) + "<br>"
-                                        + tr("Click <strong>{0}</strong> to ignore." + "</html>", options[1].text);
+        String message = "<html>" + trn(
+                "There is {0} object in your local dataset which "
+                + "might be deleted on the server.<br>If you later try to delete or "
+                + "update this the server is likely to report a conflict.",
+                "There are {0} objects in your local dataset which "
+                + "might be deleted on the server.<br>If you later try to delete or "
+                + "update them the server is likely to report a conflict.",
+                potentiallyDeleted.size(), potentiallyDeleted.size())
+                + "<br>"
+                + trn("Click <strong>{0}</strong> to check the state of this object on the server.",
+                "Click <strong>{0}</strong> to check the state of these objects on the server.",
+                potentiallyDeleted.size(),
+                options[0].text) + "<br>"
+                + tr("Click <strong>{0}</strong> to ignore." + "</html>", options[1].text);
 
         int ret = HelpAwareOptionPane.showOptionDialog(
                 Main.parent,
diff --git a/src/org/openstreetmap/josm/command/DeleteCommand.java b/src/org/openstreetmap/josm/command/DeleteCommand.java
index e6751cc..b1fc08d 100644
--- a/src/org/openstreetmap/josm/command/DeleteCommand.java
+++ b/src/org/openstreetmap/josm/command/DeleteCommand.java
@@ -473,12 +473,6 @@ public class DeleteCommand extends Command {
     }
 
     private static boolean confirmRelationDeletion(Collection<Relation> relations) {
-        String relationString = "<ul>";
-        for(Relation r:relations) {
-            relationString += "<li>"+DefaultNameFormatter.getInstance().format(r) + "</li>";
-        }
-        relationString += "</ul>";
-        
         JPanel msg = new JPanel(new GridBagLayout());
         msg.add(new JLabel("<html>" + trn(
                 "You are about to delete {0} relation: {1}"
@@ -491,7 +485,8 @@ public class DeleteCommand extends Command {
                 + "This step is rarely necessary and cannot be undone easily after being uploaded to the server."
                 + "<br/>"
                 + "Do you really want to delete?",
-                relations.size(), relations.size(), relationString) + "</html>"));
+                relations.size(), relations.size(), DefaultNameFormatter.getInstance().formatAsHtmlUnorderedList(relations))
+                + "</html>"));
         boolean answer = ConditionalOptionPaneUtil.showConfirmationDialog(
                 "delete_relations",
                 Main.parent,
diff --git a/src/org/openstreetmap/josm/data/osm/DataIntegrityProblemException.java b/src/org/openstreetmap/josm/data/osm/DataIntegrityProblemException.java
index 12ee0d3..071d8be 100644
--- a/src/org/openstreetmap/josm/data/osm/DataIntegrityProblemException.java
+++ b/src/org/openstreetmap/josm/data/osm/DataIntegrityProblemException.java
@@ -3,8 +3,18 @@ package org.openstreetmap.josm.data.osm;
 
 public class DataIntegrityProblemException extends RuntimeException {
 
+    private String htmlMessage;
+
     public DataIntegrityProblemException(String message) {
         super(message);
     }
 
+    public DataIntegrityProblemException(String message, String htmlMessage) {
+        super(message);
+        this.htmlMessage = htmlMessage;
+    }
+
+    public String getHtmlMessage() {
+        return htmlMessage;
+    }
 }
diff --git a/src/org/openstreetmap/josm/data/osm/Way.java b/src/org/openstreetmap/josm/data/osm/Way.java
index 5a5e847..4826657 100644
--- a/src/org/openstreetmap/josm/data/osm/Way.java
+++ b/src/org/openstreetmap/josm/data/osm/Way.java
@@ -13,6 +13,7 @@ import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.osm.visitor.PrimitiveVisitor;
 import org.openstreetmap.josm.data.osm.visitor.Visitor;
+import org.openstreetmap.josm.gui.DefaultNameFormatter;
 import org.openstreetmap.josm.tools.CopyList;
 import org.openstreetmap.josm.tools.Pair;
 
@@ -507,14 +508,19 @@ public final class Way extends OsmPrimitive implements IWay {
             Node[] nodes = this.nodes;
             for (Node n: nodes) {
                 if (n.getDataSet() != dataSet)
-                    throw new DataIntegrityProblemException("Nodes in way must be in the same dataset");
+                    throw new DataIntegrityProblemException("Nodes in way must be in the same dataset",
+                            tr("Nodes in way must be in the same dataset"));
                 if (n.isDeleted())
-                    throw new DataIntegrityProblemException("Deleted node referenced: " + toString());
+                    throw new DataIntegrityProblemException("Deleted node referenced: " + toString(),
+                            "<html>" + tr("Deleted node referenced by {0}", DefaultNameFormatter.getInstance().formatAsHtmlUnorderedList(this)) + "</html>");
             }
             if (Main.pref.getBoolean("debug.checkNullCoor", true)) {
                 for (Node n: nodes) {
                     if (!n.isIncomplete() && (n.getCoor() == null || n.getEastNorth() == null))
-                        throw new DataIntegrityProblemException("Complete node with null coordinates: " + toString() + n.get3892DebugInfo());
+                        throw new DataIntegrityProblemException("Complete node with null coordinates: " + toString() + n.get3892DebugInfo(),
+                                "<html>" + tr("Complete node {0} with null coordinates in way {1}",
+                                DefaultNameFormatter.getInstance().formatAsHtmlUnorderedList(n),
+                                DefaultNameFormatter.getInstance().formatAsHtmlUnorderedList(this)) + "</html>");
                 }
             }
         }
diff --git a/src/org/openstreetmap/josm/gui/DefaultNameFormatter.java b/src/org/openstreetmap/josm/gui/DefaultNameFormatter.java
index 142f3d4..0b06aa0 100644
--- a/src/org/openstreetmap/josm/gui/DefaultNameFormatter.java
+++ b/src/org/openstreetmap/josm/gui/DefaultNameFormatter.java
@@ -8,6 +8,7 @@ import static org.openstreetmap.josm.tools.I18n.trn;
 
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collection;
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.HashSet;
@@ -22,6 +23,7 @@ import org.openstreetmap.josm.data.osm.IPrimitive;
 import org.openstreetmap.josm.data.osm.IRelation;
 import org.openstreetmap.josm.data.osm.NameFormatter;
 import org.openstreetmap.josm.data.osm.Node;
+import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.data.osm.OsmUtils;
 import org.openstreetmap.josm.data.osm.Relation;
 import org.openstreetmap.josm.data.osm.Way;
@@ -707,4 +709,18 @@ public class DefaultNameFormatter implements NameFormatter, HistoryNameFormatter
         sb.append("</html>");
         return sb.toString();
     }
+
+    public String formatAsHtmlUnorderedList(Collection<? extends OsmPrimitive> primitives) {
+        StringBuilder sb = new StringBuilder(1024);
+        sb.append("<ul>");
+        for (OsmPrimitive i : primitives) {
+            sb.append("<li>").append(i.getDisplayName(this)).append("</li>");
+        }
+        sb.append("</ul>");
+        return sb.toString();
+    }
+
+    public String formatAsHtmlUnorderedList(OsmPrimitive... primitives) {
+        return formatAsHtmlUnorderedList(Arrays.asList(primitives));
+    }
 }
diff --git a/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java b/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
index 2b06a02..83b3d80 100644
--- a/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
+++ b/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
@@ -328,7 +328,7 @@ public class OsmDataLayer extends Layer implements Listener, SelectionChangedLis
         } catch (DataIntegrityProblemException e) {
             JOptionPane.showMessageDialog(
                     Main.parent,
-                    e.getMessage(),
+                    e.getHtmlMessage() != null ? e.getHtmlMessage() : e.getMessage(),
                     tr("Error"),
                     JOptionPane.ERROR_MESSAGE
             );
