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/gui/mappaint/mapcss/MapCSSStyleSource.java

    r10837 r11374  
    6060import org.openstreetmap.josm.io.CachedFile;
    6161import org.openstreetmap.josm.tools.CheckParameterUtil;
     62import org.openstreetmap.josm.tools.JosmRuntimeException;
    6263import org.openstreetmap.josm.tools.LanguageInfo;
    6364import org.openstreetmap.josm.tools.Utils;
     
    108109                SUPPORTED_KEYS.add((String) f.get(null));
    109110                if (!f.getName().toLowerCase(Locale.ENGLISH).replace('_', '-').equals(f.get(null))) {
    110                     throw new RuntimeException(f.getName());
     111                    throw new JosmRuntimeException(f.getName());
    111112                }
    112113            } catch (IllegalArgumentException | IllegalAccessException ex) {
    113                 throw new RuntimeException(ex);
     114                throw new JosmRuntimeException(ex);
    114115            }
    115116        }
     
    468469                        break;
    469470                    default:
    470                         final RuntimeException e = new RuntimeException(MessageFormat.format("Unknown MapCSS base selector {0}", base));
     471                        final RuntimeException e = new JosmRuntimeException(MessageFormat.format("Unknown MapCSS base selector {0}", base));
    471472                        Main.warn(tr("Failed to parse Mappaint styles from ''{0}''. Error was: {1}", url, e.getMessage()));
    472473                        Main.error(e);
Note: See TracChangeset for help on using the changeset viewer.