Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-62059

JabberIMConnectionProvider.createConnection() swallows Exceptions

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Hi Florian Schmaus,

      this is a followup ticket to JENKINS-60193.
      While I was trying to find out why my connection didn't work, I came across this issue.

      When an XmppStringprepException occurs in JabberIMConnection(JabberPublisherDescriptor desc, AuthenticationHolder authentication), this exception is re-thrown as hudson.plugins.im.IMException.

      But in JabberIMConnectionProvider.createConnection(), only RuntimeExceptions are getting caught.

      So the log just tells me that the connection failed, but nut why it failed:

      	h.p.j.i.t.JabberIMConnectionProvider#createConnection: Creating XMPP JabberIMConnection
      	h.p.j.i.t.JabberIMConnectionProvider#createConnection: Connection failed
      

      So IMHO here Exception should get caught here, not only RuntimeException.

        Attachments

          Activity

          matthias_m Matthias Müller created issue -
          matthias_m Matthias Müller made changes -
          Field Original Value New Value
          Description Hi [~flow],

          this is a followup ticket to JENKINS-60193.
          While I was trying to find out why my connection didn't work, I came across this issue.

          When an {{XmppStringprepException}} occurs in [JabberIMConnection(JabberPublisherDescriptor desc, AuthenticationHolder authentication)|https://github.com/jenkinsci/jabber-plugin/blob/1.38/src/main/java/hudson/plugins/jabber/im/transport/JabberIMConnection.java#L194], this exception is re-thrown as {{hudson.plugins.im.IMException}}.

          But in [JabberIMConnectionProvider.createConnection()|https://github.com/jenkinsci/jabber-plugin/blob/1.38/src/main/java/hudson/plugins/jabber/im/transport/JabberIMConnectionProvider.java#L72], only RuntimeExceptions are getting caught.

          So the log just tells me that the connection failed, but nut *why* it failed:
          {code} h.p.j.i.t.JabberIMConnectionProvider#createConnection: Creating XMPP JabberIMConnection
          h.p.j.i.t.JabberIMConnectionProvider#createConnection: Connection failed
          {code}

          So IMHO here {{Exception}}s should get caught here, not only {{RuntimeException}}.

          Regards
          Matthias
          Hi [~flow],

          this is a followup ticket to JENKINS-60193.
          While I was trying to find out why my connection didn't work, I came across this issue.

          When an {{XmppStringprepException}} occurs in [JabberIMConnection(JabberPublisherDescriptor desc, AuthenticationHolder authentication)|https://github.com/jenkinsci/jabber-plugin/blob/1.38/src/main/java/hudson/plugins/jabber/im/transport/JabberIMConnection.java#L194], this exception is re-thrown as {{hudson.plugins.im.IMException}}.

          But in [JabberIMConnectionProvider.createConnection()|https://github.com/jenkinsci/jabber-plugin/blob/1.38/src/main/java/hudson/plugins/jabber/im/transport/JabberIMConnectionProvider.java#L72], only RuntimeExceptions are getting caught.

          So the log just tells me that the connection failed, but nut *why* it failed:
          {code} h.p.j.i.t.JabberIMConnectionProvider#createConnection: Creating XMPP JabberIMConnection
          h.p.j.i.t.JabberIMConnectionProvider#createConnection: Connection failed
          {code}

          So IMHO here {{Exception}} should get caught here, not only {{RuntimeException}}.

          Regards
          Matthias
          flow Florian Schmaus made changes -
          Description Hi [~flow],

          this is a followup ticket to JENKINS-60193.
          While I was trying to find out why my connection didn't work, I came across this issue.

          When an {{XmppStringprepException}} occurs in [JabberIMConnection(JabberPublisherDescriptor desc, AuthenticationHolder authentication)|https://github.com/jenkinsci/jabber-plugin/blob/1.38/src/main/java/hudson/plugins/jabber/im/transport/JabberIMConnection.java#L194], this exception is re-thrown as {{hudson.plugins.im.IMException}}.

          But in [JabberIMConnectionProvider.createConnection()|https://github.com/jenkinsci/jabber-plugin/blob/1.38/src/main/java/hudson/plugins/jabber/im/transport/JabberIMConnectionProvider.java#L72], only RuntimeExceptions are getting caught.

          So the log just tells me that the connection failed, but nut *why* it failed:
          {code} h.p.j.i.t.JabberIMConnectionProvider#createConnection: Creating XMPP JabberIMConnection
          h.p.j.i.t.JabberIMConnectionProvider#createConnection: Connection failed
          {code}

          So IMHO here {{Exception}} should get caught here, not only {{RuntimeException}}.

          Regards
          Matthias
          Hi [~flow],

          this is a followup ticket to JENKINS-60193.
           While I was trying to find out why my connection didn't work, I came across this issue.

          When an {{XmppStringprepException}} occurs in [JabberIMConnection(JabberPublisherDescriptor desc, AuthenticationHolder authentication)|https://github.com/jenkinsci/jabber-plugin/blob/1.38/src/main/java/hudson/plugins/jabber/im/transport/JabberIMConnection.java#L194], this exception is re-thrown as {{hudson.plugins.im.IMException}}.

          But in [JabberIMConnectionProvider.createConnection()|https://github.com/jenkinsci/jabber-plugin/blob/1.38/src/main/java/hudson/plugins/jabber/im/transport/JabberIMConnectionProvider.java#L72], only RuntimeExceptions are getting caught.

          So the log just tells me that the connection failed, but nut *why* it failed:
          {code:java}
          h.p.j.i.t.JabberIMConnectionProvider#createConnection: Creating XMPP JabberIMConnection
          h.p.j.i.t.JabberIMConnectionProvider#createConnection: Connection failed
          {code}
          So IMHO here {{Exception}} should get caught here, not only {{RuntimeException}}.
          flow Florian Schmaus made changes -
          Component/s instant-messaging-plugin [ 15637 ]
          Component/s jabber-plugin [ 15507 ]
          flow Florian Schmaus made changes -
          Status Open [ 1 ] In Progress [ 3 ]

            People

            Assignee:
            flow Florian Schmaus
            Reporter:
            matthias_m Matthias Müller
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: