protected QueryEvaluationException convert(Exception e) {
if (e instanceof ClosedByInterruptException) {
return new QueryInterruptedException(e);
}
else if (e instanceof IOException) {
return new QueryEvaluationException(e);
}
else if (e instanceof RuntimeException) {
throw (RuntimeException)e;
}
else if (e == null) {
throw new IllegalArgumentException("e must not be null");
}
else {
throw new IllegalArgumentException("Unexpected exception type: " + e.getClass());
}
}
};
}
catch (IOException e) {
throw new QueryEvaluationException("Unable to get statements", e);
}
}