Ignore:
Timestamp:
2016-01-09T12:10:25+01:00 (8 years ago)
Author:
simon04
Message:

see #12083 - Search: improve error message when keyword without a required parameter is used

Example: foo type bar

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java

    r9067 r9349  
    183183                            return new TimestampRange(minDate, maxDate);
    184184                        } else {
    185                             // I18n: Don't translate timestamp keyword
    186                             throw new ParseError(tr("Expecting <i>min</i>/<i>max</i> after ''timestamp''"));
     185                            throw new ParseError("<html>" + tr("Expecting {0} after {1}", "<i>min</i>/<i>max</i>", "<i>timestamp</i>"));
    187186                        }
    188187                    }
    189                 }
    190             }
    191             return null;
     188                } else {
     189                    throw new ParseError("<html>" + tr("Expecting {0} after {1}", "<code>:</code>", "<i>" + keyword + "</i>"));
     190                }
     191            }
     192            throw new IllegalStateException("Not expecting keyword " + keyword);
    192193        }
    193194
Note: See TracChangeset for help on using the changeset viewer.