Skip to content

Commit

Permalink
report text of malformed querries in Logcat
Browse files Browse the repository at this point in the history
removes need to create temporary debugging statements during development
currently with code causing 400 errors one must create temporary debug entry outputting failing query, now this will be done automatically
  • Loading branch information
matkoniecz committed Mar 7, 2018
1 parent d736773 commit b1d6470
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,14 @@ public synchronized void get(final String query, MapDataWithGeometryHandler hand
}
catch(OsmApiException e)
{
if(e.getErrorCode() == 429)
if(e.getErrorCode() == 429) {
throw new OsmTooManyRequestsException(e.getErrorCode(), e.getErrorTitle(), e.getDescription());
else
} else if(e.getErrorCode() == 400) {
Log.e(TAG, "malformed query, caused Overpass to return error code 400: " + query);
throw e;
} else {
throw e;
}
}
}

Expand Down

0 comments on commit b1d6470

Please sign in to comment.