}
/** Throws RuntimeException if the given string is not a valid StringTemplate */
public static void verifyValidTemplate(String template) {
StringTemplate st = st("");
st.setErrorListener(new StringTemplateErrorListener() {
public void error(String s, Throwable ex) {
// dig deep for a reasonable error string
Throwable last = null;
for (Throwable t = ex; t != null; t = t.getCause())
last = t;