You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by gt...@apache.org on 2013/05/07 12:51:40 UTC

svn commit: r1479852 - /activemq/trunk/activemq-client/src/main/java/org/apache/activemq/util/IntrospectionSupport.java

Author: gtully
Date: Tue May  7 10:51:40 2013
New Revision: 1479852

URL: http://svn.apache.org/r1479852
Log:
https://issues.apache.org/jira/browse/AMQ-4428 - patch applied with thanks - errors are now logged and throwables propagate

Modified:
    activemq/trunk/activemq-client/src/main/java/org/apache/activemq/util/IntrospectionSupport.java

Modified: activemq/trunk/activemq-client/src/main/java/org/apache/activemq/util/IntrospectionSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-client/src/main/java/org/apache/activemq/util/IntrospectionSupport.java?rev=1479852&r1=1479851&r2=1479852&view=diff
==============================================================================
--- activemq/trunk/activemq-client/src/main/java/org/apache/activemq/util/IntrospectionSupport.java (original)
+++ activemq/trunk/activemq-client/src/main/java/org/apache/activemq/util/IntrospectionSupport.java Tue May  7 10:51:40 2013
@@ -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);
             }
         }