Strabon

changeset 257:ccd300595dc7

use a general try/catch in StrabonWrapper.evaluateQuery
author Babis Nikolaou <charnik@di.uoa.gr>
date Wed Jun 06 13:08:54 2012 +0300 (2012-06-06)
parents 60f9e710025f
children a4e7e9fc4d10
files endpoint/src/main/java/eu/earthobservatory/org/StrabonEndpoint/QueryBean.java
line diff
     1.1 --- a/endpoint/src/main/java/eu/earthobservatory/org/StrabonEndpoint/QueryBean.java	Wed Jun 06 13:06:36 2012 +0300
     1.2 +++ b/endpoint/src/main/java/eu/earthobservatory/org/StrabonEndpoint/QueryBean.java	Wed Jun 06 13:08:54 2012 +0300
     1.3 @@ -403,26 +403,8 @@
     1.4  			} else {
     1.5  				answer = (String) strabonWrapper.query(SPARQLQuery, resultFormat);
     1.6  			}
     1.7 -		} catch (MalformedQueryException e) {
     1.8 -			logger.error("[StrabonEndpoint.QueryBean] ", e.getStackTrace());
     1.9 -			errorMessage.append(e.getMessage());
    1.10 -		} catch (RepositoryException e) {
    1.11 -			logger.error("[StrabonEndpoint.QueryBean] ", e.getStackTrace());
    1.12 -			errorMessage.append(e.getMessage());
    1.13 -		} catch (QueryEvaluationException e) {
    1.14 -			logger.error("[StrabonEndpoint.QueryBean] ", e.getStackTrace());
    1.15 -			errorMessage.append(e.getMessage());
    1.16 -		} catch (TupleQueryResultHandlerException e) {
    1.17 -			logger.error("[StrabonEndpoint.QueryBean] ", e.getStackTrace());
    1.18 -			errorMessage.append(e.getMessage());
    1.19 -		} catch (IOException e) {
    1.20 -			logger.error("[StrabonEndpoint.QueryBean] ", e.getStackTrace());
    1.21 -			errorMessage.append(e.getMessage());
    1.22 -		} catch (ClassNotFoundException e) {
    1.23 -			logger.error("[StrabonEndpoint.QueryBean] ", e.getStackTrace());
    1.24 -			errorMessage.append(e.getMessage());
    1.25  		} catch (Exception e) {
    1.26 -			logger.error("[StrabonEndpoint.QueryBean] ", e.getStackTrace());
    1.27 +			logger.error("[StrabonEndpoint.QueryBean] Error during querying.", e);
    1.28  			errorMessage.append(e.getMessage());
    1.29  		}
    1.30