From 864fdbebef4f77b2f5cd46b2463909eea64f0ba1 Mon Sep 17 00:00:00 2001 From: Gary Tully Date: Tue, 7 May 2013 10:51:40 +0000 Subject: [PATCH] https://issues.apache.org/jira/browse/AMQ-4428 - patch applied with thanks - errors are now logged and throwables propagate git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1479852 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/activemq/util/IntrospectionSupport.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/activemq-client/src/main/java/org/apache/activemq/util/IntrospectionSupport.java b/activemq-client/src/main/java/org/apache/activemq/util/IntrospectionSupport.java index 07c2d06b9e..a13e7b4b39 100755 --- a/activemq-client/src/main/java/org/apache/activemq/util/IntrospectionSupport.java +++ b/activemq-client/src/main/java/org/apache/activemq/util/IntrospectionSupport.java @@ -85,7 +85,7 @@ public final class IntrospectionSupport { props.put(optionPrefix + name, strValue); rc = true; - } catch (Throwable ignore) { + } catch (Exception ignore) { } } } @@ -178,7 +178,8 @@ public final class IntrospectionSupport { setter.invoke(target, convert(value, setter.getParameterTypes()[0])); } return true; - } catch (Throwable ignore) { + } catch (Exception e) { + LOG.error(String.format("Could not set property %s on %s", name, target), e); return false; } } @@ -345,11 +346,11 @@ public final class IntrospectionSupport { if (o != null && o.getClass().isArray()) { try { o = Arrays.asList((Object[])o); - } catch (Throwable e) { + } catch (Exception e) { } } map.put(field.getName(), o); - } catch (Throwable e) { + } catch (Exception e) { LOG.debug("Error getting field " + field + " on class " + startClass + ". This exception is ignored.", e); } }