Changeset 9385 in josm for trunk/src/org/openstreetmap/josm/tools/OverpassTurboQueryWizard.java
- Timestamp:
- 2016-01-10T13:48:42+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/OverpassTurboQueryWizard.java
r8855 r9385 24 24 private static OverpassTurboQueryWizard instance; 25 25 private final ScriptEngine engine = new ScriptEngineManager().getEngineByName("JavaScript"); 26 27 /**28 * An exception to indicate a failed parse.29 */30 public static class ParseException extends RuntimeException {31 }32 26 33 27 /** … … 60 54 * @param search the {@link org.openstreetmap.josm.actions.search.SearchAction} like query 61 55 * @return an Overpass QL query 62 * @throws ParseException when the parsing fails56 * @throws UncheckedParseException when the parsing fails 63 57 */ 64 public String constructQuery(String search) throws ParseException {58 public String constructQuery(String search) throws UncheckedParseException { 65 59 try { 66 60 final Object result = ((Invocable) engine).invokeFunction("construct_query", search); 67 61 if (result == Boolean.FALSE) { 68 throw new ParseException();62 throw new UncheckedParseException(); 69 63 } 70 64 String query = (String) result;
Note:
See TracChangeset
for help on using the changeset viewer.