Changeset 8394 in josm for trunk/src/org/openstreetmap/josm/io/remotecontrol/handler
- Timestamp:
- 2015-05-18T23:34:11+02:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/io/remotecontrol/handler
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/AddNodeHandler.java
r7937 r8394 30 30 private double lat; 31 31 private double lon; 32 32 33 33 private Node node; 34 34 … … 47 47 return new String[] { "lat", "lon" }; 48 48 } 49 49 50 50 @Override 51 51 public String[] getOptionalParams() … … 63 63 return new String[] { 64 64 "/add_node?lat=11&lon=22", 65 "/add_node?lon=13.3&lat=53.2&addtags=natural=tree|name=%20%20%20==Great%20Oak==" 65 "/add_node?lon=13.3&lat=53.2&addtags=natural=tree|name=%20%20%20==Great%20Oak==" 66 66 }; 67 67 } 68 68 69 69 @Override 70 70 public String getPermissionMessage() { … … 122 122 lon = Double.parseDouble(args.get("lon")); 123 123 } catch (NumberFormatException e) { 124 throw new RequestHandlerBadRequestException("NumberFormatException ("+e.getMessage()+")" );124 throw new RequestHandlerBadRequestException("NumberFormatException ("+e.getMessage()+")", e); 125 125 } 126 126 if (!Main.main.hasEditLayer()) { -
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/AddWayHandler.java
r8332 r8394 104 104 allCoordinates.add(new LatLon(lat, lon)); 105 105 } catch (NumberFormatException e) { 106 throw new RequestHandlerBadRequestException("NumberFormatException ("+e.getMessage()+")" );106 throw new RequestHandlerBadRequestException("NumberFormatException ("+e.getMessage()+")", e); 107 107 } 108 108 } -
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadAndZoomHandler.java
r8318 r8394 272 272 maxlon = LatLon.roundToOsmPrecision(Double.parseDouble(args.get("right"))); 273 273 } catch (NumberFormatException e) { 274 throw new RequestHandlerBadRequestException("NumberFormatException ("+e.getMessage()+")" );274 throw new RequestHandlerBadRequestException("NumberFormatException ("+e.getMessage()+")", e); 275 275 } 276 276 -
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/RequestHandler.java
r8338 r8394 223 223 if(mandatory != null) for (String key : mandatory) { 224 224 String value = args.get(key); 225 if ( (value == null) || (value.length() == 0)) {225 if (value == null || value.isEmpty()) { 226 226 error = true; 227 227 Main.warn("'" + myCommand + "' remote control request must have '" + key + "' parameter");
Note:
See TracChangeset
for help on using the changeset viewer.