Ignore:
Timestamp:
2010-06-03T21:20:54+02:00 (14 years ago)
Author:
stoecker
Message:

catch all errors thrown from search (there are also out of array index and the like)

File:
1 edited

Legend:

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

    r3140 r3303  
    164164                try {
    165165                    this.keyPattern = Pattern.compile(key, searchFlags);
     166                } catch (PatternSyntaxException e) {
     167                    throw new ParseError(tr(rxErrorMsg, e.getPattern(), e.getIndex(), e.getMessage()));
     168                } catch (Exception e) {
     169                    throw new ParseError(tr(rxErrorMsg, key, tr("<unknown>"), e.getMessage()));
     170                }
     171                try {
    166172                    this.valuePattern = Pattern.compile(value, searchFlags);
    167173                } catch (PatternSyntaxException e) {
    168174                    throw new ParseError(tr(rxErrorMsg, e.getPattern(), e.getIndex(), e.getMessage()));
     175                } catch (Exception e) {
     176                    throw new ParseError(tr(rxErrorMsg, value, tr("<unknown>"), e.getMessage()));
    169177                }
    170178                this.key = key;
     
    369377                } catch (PatternSyntaxException e) {
    370378                    throw new ParseError(tr(rxErrorMsg, e.getPattern(), e.getIndex(), e.getMessage()));
     379                } catch (Exception e) {
     380                    throw new ParseError(tr(rxErrorMsg, s, tr("<unknown>"), e.getMessage()));
    371381                }
    372382                this.search = s;
Note: See TracChangeset for help on using the changeset viewer.