From 4e6d824d1039ccabd2aecdbb3bc92109b8e95ccc Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Thu, 2 Apr 2015 08:01:31 -0700 Subject: [PATCH] Limit our catchall exceptioning. --- src/main/java/com/samskivert/depot/impl/DepotMarshaller.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/samskivert/depot/impl/DepotMarshaller.java b/src/main/java/com/samskivert/depot/impl/DepotMarshaller.java index 2b84578..ca37373 100644 --- a/src/main/java/com/samskivert/depot/impl/DepotMarshaller.java +++ b/src/main/java/com/samskivert/depot/impl/DepotMarshaller.java @@ -917,12 +917,14 @@ public class DepotMarshaller implements QueryMarshal throw new IllegalArgumentException( "Index flagged as complex, but no defining method '" + name + "' found.", nsme); } + Object config; try { - return buildIndex(name, unique, method.invoke(null)); + config = method.invoke(null); } catch (Exception e) { throw new IllegalArgumentException( "Error calling index definition method '" + name + "'", e); } + return buildIndex(name, unique, config); } protected CreateIndexClause buildIndex (String name, boolean unique, Object config)