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

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

Location:
trunk/src/org/openstreetmap/josm/data/projection/proj
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/projection/proj/ClassProjFactory.java

    r10208 r11374  
    11// License: GPL. For details, see LICENSE file.
    22package org.openstreetmap.josm.data.projection.proj;
     3
     4import org.openstreetmap.josm.tools.JosmRuntimeException;
    35
    46/**
     
    2325            proj = projClass.getConstructor().newInstance();
    2426        } catch (ReflectiveOperationException e) {
    25             throw new RuntimeException(e);
     27            throw new JosmRuntimeException(e);
    2628        }
    2729        return proj;
  • trunk/src/org/openstreetmap/josm/data/projection/proj/SwissObliqueMercator.java

    r10308 r11374  
    2020import org.openstreetmap.josm.data.projection.Ellipsoid;
    2121import org.openstreetmap.josm.data.projection.ProjectionConfigurationException;
     22import org.openstreetmap.josm.tools.JosmRuntimeException;
    2223
    2324// CHECKSTYLE.OFF: LineLength
     
    108109        while (abs(phi - prevPhi) > EPSILON) {
    109110            if (++iteration > 30)
    110                 throw new RuntimeException("Two many iterations");
     111                throw new JosmRuntimeException("Two many iterations");
    111112            prevPhi = phi;
    112113            double s = 1 / alpha * (log(tan(PI / 4 + b / 2)) - k) + ellps.e
Note: See TracChangeset for help on using the changeset viewer.