Ignore:
Timestamp:
2017-03-19T02:26:34+01:00 (7 years ago)
Author:
Don-vip
Message:

PMD - Strict Exceptions

Location:
trunk/src/org/openstreetmap/josm/gui/dialogs
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/DialogsPanel.java

    r11452 r11746  
    1717import org.openstreetmap.josm.tools.CheckParameterUtil;
    1818import org.openstreetmap.josm.tools.Destroyable;
     19import org.openstreetmap.josm.tools.JosmRuntimeException;
    1920import org.openstreetmap.josm.tools.bugreport.BugReport;
    2021
     
    325326            try {
    326327                t.destroy();
    327             } catch (RuntimeException e) {
     328            } catch (JosmRuntimeException | IllegalArgumentException | IllegalStateException e) {
    328329                throw BugReport.intercept(e).put("dialog", t).put("dialog-class", t.getClass());
    329330            }
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentPanel.java

    r10938 r11746  
    5454import org.openstreetmap.josm.gui.widgets.PopupMenuLauncher;
    5555import org.openstreetmap.josm.tools.ImageProvider;
     56import org.openstreetmap.josm.tools.JosmRuntimeException;
    5657import org.openstreetmap.josm.tools.bugreport.BugReportExceptionHandler;
    5758
     
    235236                        GuiHelper.runInEDT(() -> HistoryBrowserDialogManager.getInstance().show(h));
    236237                    }
    237                 } catch (final RuntimeException e) {
     238                } catch (final JosmRuntimeException | IllegalArgumentException | IllegalStateException e) {
    238239                    GuiHelper.runInEDT(() -> BugReportExceptionHandler.handleException(e));
    239240                }
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableModel.java

    r11684 r11746  
    4646import org.openstreetmap.josm.gui.util.GuiHelper;
    4747import org.openstreetmap.josm.gui.widgets.OsmPrimitivesTableModel;
     48import org.openstreetmap.josm.tools.JosmRuntimeException;
    4849import org.openstreetmap.josm.tools.bugreport.BugReport;
    4950
     
    808809            }
    809810            return connectionType.get(i);
    810         } catch (RuntimeException e) {
     811        } catch (JosmRuntimeException | IllegalArgumentException | IllegalStateException e) {
    811812            throw BugReport.intercept(e).put("i", i).put("members", members).put("relation", relation);
    812813        }
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/WayConnectionTypeCalculator.java

    r11452 r11746  
    1313import org.openstreetmap.josm.data.osm.Way;
    1414import org.openstreetmap.josm.gui.dialogs.relation.sort.WayConnectionType.Direction;
     15import org.openstreetmap.josm.tools.JosmRuntimeException;
    1516import org.openstreetmap.josm.tools.bugreport.BugReport;
    1617
     
    4445            try {
    4546                lastWct = updateLinksFor(con, lastWct, i);
    46             } catch (RuntimeException e) {
     47            } catch (JosmRuntimeException | IllegalArgumentException | IllegalStateException e) {
    4748                int index = i;
    4849                throw BugReport.intercept(e).put("i", i).put("member", () -> members.get(index)).put("con", con);
Note: See TracChangeset for help on using the changeset viewer.