@Override protected void throwInterruptedException() throws QueryEvaluationException { throw new QueryInterruptedException("execution took too long"); } };
@Override 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()); } } };
@Override 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()); } } };
@Override protected QueryEvaluationException convert(Exception e) { if (e instanceof ClosedByInterruptException) { return new QueryInterruptedException(e); } if (e instanceof IOException) { return new QueryEvaluationException(e); } if (e instanceof SailException) { if(e.getCause() instanceof ResultInterruptedException) { return new QueryInterruptedException(e); } return new QueryEvaluationException(e); } if (e instanceof RuntimeException) { throw (RuntimeException)e; } if (e == null) { throw new IllegalArgumentException("e must not be null"); } throw new IllegalArgumentException("Unexpected exception type: " + e.getClass(),e); } };
@Override protected QueryEvaluationException convert(Exception e) { if (e instanceof ClosedByInterruptException) { return new QueryInterruptedException(e); } if (e instanceof IOException) { return new QueryEvaluationException(e); } if (e instanceof SailException) { if(e.getCause() instanceof ResultInterruptedException) { return new QueryInterruptedException(e); } return new QueryEvaluationException(e); } if (e instanceof RuntimeException) { throw (RuntimeException)e; } if (e == null) { throw new IllegalArgumentException("e must not be null"); } throw new IllegalArgumentException("Unexpected exception type: " + e.getClass(),e); } };
queryStatement.close(); throw new QueryInterruptedException("SPARQL query execution cancelled"); } catch (ExecutionException e) { log.error("error executing SPARQL query", e.getCause()); throw new QueryEvaluationException(e.getCause()); } else if (e.getCause() instanceof InterruptedException) { throw new QueryInterruptedException(e.getCause()); } else { throw new QueryEvaluationException("error executing SPARQL query", e);
throw new UnauthorizedException(); case HttpURLConnection.HTTP_UNAVAILABLE: // 503 throw new QueryInterruptedException(); default: ErrorInfo errInfo = getErrorInfo(response);
throw new QueryInterruptedException(t);