diff --git a/src/main/java/org/xbib/elasticsearch/common/util/PlainIndexableObject.java b/src/main/java/org/xbib/elasticsearch/common/util/PlainIndexableObject.java index f86ef03b..5b84be46 100644 --- a/src/main/java/org/xbib/elasticsearch/common/util/PlainIndexableObject.java +++ b/src/main/java/org/xbib/elasticsearch/common/util/PlainIndexableObject.java @@ -165,7 +165,7 @@ protected XContentBuilder toXContent(XContentBuilder builder, Params params, Map } else { try { builder.value(o); - } catch (Throwable e) { + } catch (Exception e) { throw new IOException("unknown object class for value:" + o.getClass().getName() + " " + o); } } diff --git a/src/main/java/org/xbib/elasticsearch/jdbc/strategy/standard/StandardContext.java b/src/main/java/org/xbib/elasticsearch/jdbc/strategy/standard/StandardContext.java index 81fe63f8..cf686009 100644 --- a/src/main/java/org/xbib/elasticsearch/jdbc/strategy/standard/StandardContext.java +++ b/src/main/java/org/xbib/elasticsearch/jdbc/strategy/standard/StandardContext.java @@ -186,7 +186,7 @@ public void fetch() throws Exception { logger.debug("fetch"); try { getSource().fetch(); - } catch (Throwable e) { + } catch (Exception e) { setThrowable(e); logger.error(e.getMessage(), e); } @@ -198,13 +198,13 @@ public void afterFetch() throws Exception { writeState(); try { getSource().afterFetch(); - } catch (Throwable e) { + } catch (Exception e) { setThrowable(e); logger.error(e.getMessage(), e); } try { getSink().afterFetch(); - } catch (Throwable e) { + } catch (Exception e) { setThrowable(e); logger.error(e.getMessage(), e); } diff --git a/src/main/java/org/xbib/elasticsearch/jdbc/strategy/standard/StandardSource.java b/src/main/java/org/xbib/elasticsearch/jdbc/strategy/standard/StandardSource.java index 7b640f57..1871f102 100644 --- a/src/main/java/org/xbib/elasticsearch/jdbc/strategy/standard/StandardSource.java +++ b/src/main/java/org/xbib/elasticsearch/jdbc/strategy/standard/StandardSource.java @@ -929,7 +929,7 @@ public StandardSource register(CallableStatement statement, Map 1 ? new FileInputStream(args[1]) : System.in; commandLineInterpreter.reader("args", in).run(true); in.close(); - } catch (Throwable e) { + } catch (Exception e) { e.printStackTrace(); System.exit(1); }