Changeset 12973 in josm


Ignore:
Timestamp:
2017-10-09T22:03:00+02:00 (7 days ago)
Author:
Don-vip
Message:

see #15008, see #15421 - collect debug data when a DataIntegrityProblemException occurs when firing a selection event

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/event/SelectionEventManager.java

    r12970 r12973  
    1212
    1313import org.openstreetmap.josm.data.SelectionChangedListener;
     14import org.openstreetmap.josm.data.osm.DataIntegrityProblemException;
    1415import org.openstreetmap.josm.data.osm.DataSelectionListener;
    1516import org.openstreetmap.josm.data.osm.DataSet;
     
    1920import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeEvent;
    2021import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeListener;
     22import org.openstreetmap.josm.tools.bugreport.BugReport;
    2123
    2224/**
     
    199201    private static void fireEvent(List<ListenerInfo> listeners, SelectionChangeEvent event) {
    200202        for (ListenerInfo listener: listeners) {
    201             listener.fire(event);
     203            try {
     204                listener.fire(event);
     205            } catch (DataIntegrityProblemException e) {
     206                throw BugReport.intercept(e).put("event", event).put("listeners", listeners);
     207            }
    202208        }
    203209    }
Note: See TracChangeset for help on using the changeset viewer.