You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Erik Bunn (JIRA)" <ji...@apache.org> on 2013/05/06 13:04:17 UTC
[jira] [Commented] (AMQ-4428) Don't swallow errors in
IntrospectionSupport.setProperty
[ https://issues.apache.org/jira/browse/AMQ-4428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13649649#comment-13649649 ]
Erik Bunn commented on AMQ-4428:
--------------------------------
An example of where this swallowed Throwable produced considerable headache.
An embedded Broker's timeout options were not being set as expected. The first suspect was documentation wiki/code mismatch (FailoverTransport backoffMultiplier vs. reconnectDelayExponent), but this wasn't the real culprit: IntrospectionSupport has a static init of a third-party library, which had been missed by us while minimizing libraries for the embed. The IntrospectionSupport.setProperty() catch silently swallows the informative exception.
I would second #2, above.
Further, I would suggest catching qualified exceptions rather than Throwable, which risks silencing possible fatal errors (OOM).
> Don't swallow errors in IntrospectionSupport.setProperty
> --------------------------------------------------------
>
> Key: AMQ-4428
> URL: https://issues.apache.org/jira/browse/AMQ-4428
> Project: ActiveMQ
> Issue Type: Bug
> Reporter: Christoffer Sawicki
> Priority: Minor
> Attachments: 0001-Log-errors-in-IntrospectionSupport.setProperty.patch
>
>
> `setProperty` currently ends with `… catch (Throwable ignore) \{ return false; \}`. This can make troubleshooting invalid configuration much harder since the exception (that contains detailed information) is hidden from the user.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira