Index: /trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java	(revision 9348)
+++ /trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java	(revision 9349)
@@ -183,11 +183,12 @@
                             return new TimestampRange(minDate, maxDate);
                         } else {
-                            // I18n: Don't translate timestamp keyword
-                            throw new ParseError(tr("Expecting <i>min</i>/<i>max</i> after ''timestamp''"));
+                            throw new ParseError("<html>" + tr("Expecting {0} after {1}", "<i>min</i>/<i>max</i>", "<i>timestamp</i>"));
                         }
                     }
-                }
-            }
-            return null;
+                } else {
+                    throw new ParseError("<html>" + tr("Expecting {0} after {1}", "<code>:</code>", "<i>" + keyword + "</i>"));
+                }
+            }
+            throw new IllegalStateException("Not expecting keyword " + keyword);
         }
 
Index: /trunk/test/unit/org/openstreetmap/josm/actions/search/SearchCompilerTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/actions/search/SearchCompilerTest.java	(revision 9348)
+++ /trunk/test/unit/org/openstreetmap/josm/actions/search/SearchCompilerTest.java	(revision 9349)
@@ -2,4 +2,5 @@
 package org.openstreetmap.josm.actions.search;
 
+import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertThat;
@@ -379,3 +380,13 @@
         anonymous.match(anonymous.n2, true);
     }
+
+    @Test
+    public void testFooTypeBar() throws Exception {
+        try {
+            SearchCompiler.compile("foo type bar");
+            throw new RuntimeException();
+        } catch (ParseError parseError) {
+            assertEquals("<html>Expecting <code>:</code> after <i>type<i>", parseError.getMessage());
+        }
+    }
 }
