Changeset 14474 in josm


Ignore:
Timestamp:
2018-12-01T15:08:32+01:00 (5 years ago)
Author:
Don-vip
Message:

see #17021 - simplify exception handling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSource.java

    r14466 r14474  
    446446                    closeSourceInputStream(in);
    447447                }
    448             } catch (IOException e) {
     448            } catch (IOException | IllegalArgumentException e) {
    449449                Logging.warn(tr("Failed to load Mappaint styles from ''{0}''. Exception was: {1}", url, e.toString()));
    450450                Logging.log(Logging.LEVEL_ERROR, e);
     
    458458                Logging.error(e);
    459459                logError(new ParseException(e.getMessage())); // allow e to be garbage collected, it links to the entire token stream
    460             } catch (IllegalArgumentException e1) {
    461                 final RuntimeException e = new JosmRuntimeException(e1.getMessage());
    462                 Logging.warn(tr("Failed to parse Mappaint styles from ''{0}''. Error was: {1}", url, e.getMessage()));
    463                 Logging.error(e);
    464                 logError(e);
    465 
    466460            }
    467461            if (metadataOnly) {
Note: See TracChangeset for help on using the changeset viewer.