Ignore:
Timestamp:
2016-12-09T23:31:13+01:00 (7 years ago)
Author:
Don-vip
Message:

sonar - squid:S00112 - Generic exceptions should never be thrown: define JosmRuntimeException

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java

    r11116 r11374  
    3131import org.openstreetmap.josm.gui.ConditionalOptionPaneUtil;
    3232import org.openstreetmap.josm.gui.Notification;
     33import org.openstreetmap.josm.tools.JosmRuntimeException;
    3334import org.openstreetmap.josm.tools.Shortcut;
    3435
     
    294295                    w.calcDirections(Direction.RIGHT.changeBy(directionOffset));
    295296                    if (angleToDirectionChange(refHeading - w.heading, TOLERANCE2) != 0)
    296                         throw new RuntimeException();
     297                        throw new JosmRuntimeException("orthogonalize error");
    297298                    totSum = EN.sum(totSum, w.segSum);
    298299                }
     
    403404                }
    404405            }
    405             if (!s.isEmpty()) throw new RuntimeException();
     406            if (!s.isEmpty()) throw new JosmRuntimeException("orthogonalize error");
    406407        }
    407408
Note: See TracChangeset for help on using the changeset viewer.