activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From michaelandrepearce <...@git.apache.org>
Subject [GitHub] activemq-artemis pull request #2116: ARTEMIS-1895 - Add duplicate metadata f...
Date Wed, 30 May 2018 13:57:22 GMT
Github user michaelandrepearce commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/2116#discussion_r191777420
  
    --- Diff: artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnection.java
---
    @@ -263,6 +264,8 @@ private void validateClientID(ClientSession validateSession, String
clientID) th
           } catch (ActiveMQException e) {
              if (e.getType() == ActiveMQExceptionType.DUPLICATE_METADATA) {
                 throw new InvalidClientIDException("clientID=" + clientID + " was already
set into another connection");
    +         } else {
    +            throw new InvalidClientIDException("Error setting clientID=" + clientID +
": " + e.getMessage());
    --- End diff --
    
    The original exception here may not be related to InvalidClientId, seems a bit dangerous
to catchall and throw like this. Maybe bubble up or convert the exception 


---

Mime
View raw message