- Timestamp:
- 2014-03-08T23:36:09+01:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/ImageryHandler.java
r6690 r6902 73 73 } 74 74 GuiHelper.runInEDT(new Runnable() { 75 @Override public void run() { 76 Main.main.addLayer(ImageryLayer.create(imgInfo)); 75 @Override 76 public void run() { 77 try { 78 Main.main.addLayer(ImageryLayer.create(imgInfo)); 79 } catch (IllegalArgumentException e) { 80 Main.error(e, false); 81 } 77 82 } 78 83 }); … … 110 115 @Override 111 116 protected void validateRequest() throws RequestHandlerBadRequestException { 112 // Nothing to do 117 String url = args.get("url"); 118 String type = args.get("type"); 119 try { 120 ImageryLayer.create(new ImageryInfo(null, url, type, null, null)); 121 } catch (IllegalArgumentException e) { 122 throw new RequestHandlerBadRequestException(e.getMessage(), e); 123 } 113 124 } 114 125
Note:
See TracChangeset
for help on using the changeset viewer.