From 3d31b8284c8e23a0832a13a9c2a66cdcf3db1131 Mon Sep 17 00:00:00 2001 From: afischerdev Date: Tue, 14 Mar 2023 14:22:12 +0100 Subject: [PATCH] reduze exception info to message only --- .../src/main/java/btools/mapaccess/NodesCache.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/brouter-mapaccess/src/main/java/btools/mapaccess/NodesCache.java b/brouter-mapaccess/src/main/java/btools/mapaccess/NodesCache.java index ab89a68..ba594b9 100644 --- a/brouter-mapaccess/src/main/java/btools/mapaccess/NodesCache.java +++ b/brouter-mapaccess/src/main/java/btools/mapaccess/NodesCache.java @@ -187,6 +187,8 @@ public final class NodesCache { ghostWakeup += segment.getDataSize(); } return segment; + } catch (IOException re) { + throw new RuntimeException(re.getMessage()); } catch (RuntimeException re) { throw re; } catch (Exception e) { @@ -294,14 +296,14 @@ public final class NodesCache { for (int i = 0; i < len; i++) { MatchedWaypoint mwp = unmatchedWaypoints.get(i); if (mwp.crosspoint == null) { - if (unmatchedWaypoints.size() > 1 && i == unmatchedWaypoints.size()-1 && unmatchedWaypoints.get(i-1).direct) { + if (unmatchedWaypoints.size() > 1 && i == unmatchedWaypoints.size() - 1 && unmatchedWaypoints.get(i - 1).direct) { mwp.crosspoint = new OsmNode(mwp.waypoint.ilon, mwp.waypoint.ilat); mwp.direct = true; } else { throw new IllegalArgumentException(mwp.name + "-position not mapped in existing datafile"); } } - if (unmatchedWaypoints.size() > 1 && i == unmatchedWaypoints.size()-1 && unmatchedWaypoints.get(i-1).direct) { + if (unmatchedWaypoints.size() > 1 && i == unmatchedWaypoints.size() - 1 && unmatchedWaypoints.get(i - 1).direct) { mwp.crosspoint = new OsmNode(mwp.waypoint.ilon, mwp.waypoint.ilat); mwp.direct = true; }