Changeset 7084 in josm for trunk


Ignore:
Timestamp:
2014-05-09T06:19:22+02:00 (6 years ago)
Author:
Don-vip
Message:

see #8465 - use AssertionError constructor accepting a cause, new in Java 7

Location:
trunk/src/org/openstreetmap/josm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java

    r7005 r7084  
    767767                reversedDirectionKeys = SearchCompiler.compile(reversedDirectionDefault, false, false);
    768768            } catch (ParseError e2) {
    769                 throw new AssertionError("Unable to compile default pattern for direction keys: " + e2.getMessage());
     769                throw new AssertionError("Unable to compile default pattern for direction keys: " + e2.getMessage(), e2);
    770770            }
    771771        }
     
    778778                directionKeys = SearchCompiler.compile(directionDefault, false, false);
    779779            } catch (ParseError e2) {
    780                 throw new AssertionError("Unable to compile default pattern for direction keys: " + e2.getMessage());
     780                throw new AssertionError("Unable to compile default pattern for direction keys: " + e2.getMessage(), e2);
    781781            }
    782782        }
  • trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java

    r7059 r7084  
    118118            osm.mappaintStyle = style.put(p.a, p.b);
    119119        } catch (StyleCache.RangeViolatedError e) {
    120             AssertionError error = new AssertionError("Range violated. object: " + osm.getPrimitiveId() + ", current style: "+osm.mappaintStyle
    121                     + ", scale: " + scale + ", new stylelist: " + p.a + ", new range: " + p.b);
    122             error.initCause(e);
    123             throw error;
     120            throw new AssertionError("Range violated. object: " + osm.getPrimitiveId() + ", current style: "+osm.mappaintStyle
     121                    + ", scale: " + scale + ", new stylelist: " + p.a + ", new range: " + p.b, e);
    124122        }
    125123        osm.mappaintCacheIdx = cacheIdx;
Note: See TracChangeset for help on using the changeset viewer.