Runs a query and returns exceptions into assertion errors. @param query query to be evaluated @return string result
(final String query)
| 89 | * @return string result |
| 90 | */ |
| 91 | protected static String query(final String query) { |
| 92 | try { |
| 93 | return eval(query); |
| 94 | } catch(final JobException ex) { |
| 95 | Util.debug(ex); |
| 96 | return ""; |
| 97 | } catch(final QueryException | IOException ex) { |
| 98 | Util.stack(ex); |
| 99 | return fail("Query failed:\n" + query, ex); |
| 100 | } |
| 101 | } |
| 102 | |
| 103 | /** |
| 104 | * Checks if a query yields the specified string. |