Last change
on this file since 12656 was 12656, checked in by Don-vip, 7 years ago |
see #15182 - move SearchCompiler from actions.search to data.osm.search
|
-
Property svn:eol-style
set to
native
|
File size:
1.3 KB
|
Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.data.osm.search;
|
---|
3 |
|
---|
4 | import static org.openstreetmap.josm.tools.I18n.tr;
|
---|
5 |
|
---|
6 | import org.openstreetmap.josm.data.osm.search.PushbackTokenizer.Token;
|
---|
7 |
|
---|
8 | /**
|
---|
9 | * Search compiler parsing error.
|
---|
10 | * @since 12656 (extracted from {@link SearchCompiler}).
|
---|
11 | */
|
---|
12 | public class SearchParseError extends Exception {
|
---|
13 |
|
---|
14 | /**
|
---|
15 | * Constructs a new generic {@code ParseError}.
|
---|
16 | * @param msg the detail message. The detail message is saved for later retrieval by the {@link #getMessage()} method.
|
---|
17 | */
|
---|
18 | public SearchParseError(String msg) {
|
---|
19 | super(msg);
|
---|
20 | }
|
---|
21 |
|
---|
22 | /**
|
---|
23 | * Constructs a new generic {@code ParseError}.
|
---|
24 | * @param msg the detail message. The detail message is saved for later retrieval by the {@link #getMessage()} method.
|
---|
25 | * @param cause the cause (which is saved for later retrieval by the {@link #getCause()} method).
|
---|
26 | */
|
---|
27 | public SearchParseError(String msg, Throwable cause) {
|
---|
28 | super(msg, cause);
|
---|
29 | }
|
---|
30 |
|
---|
31 | /**
|
---|
32 | * Constructs a new detailed {@code ParseError}.
|
---|
33 | * @param expected expected token
|
---|
34 | * @param found actual token
|
---|
35 | */
|
---|
36 | public SearchParseError(Token expected, Token found) {
|
---|
37 | this(tr("Unexpected token. Expected {0}, found {1}", expected, found));
|
---|
38 | }
|
---|
39 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.