BEEPException.getCause()

Andrew Keedle <[email protected]> Thu, 6 Feb 2003 14:00:16 -0000
Newsgroups gmane.network.beep.beepcore.java.general
Message-ID <26A421F3F048114AB7EB808AEC0A53FD01ED4213@smrtipsmsdev01.smart421.com>
It there any reason why the core code does not set the cause for
BEEPException's raised? An issue I have is that a telnet connection to the
BEEP server will cause the TCPSessionCreator to throw an execption, but I
can't easily determine what the cause was, so I have to loop and recreate
the TCPSessionCreator.

    while (keepRunning)
    {
      try
      {
        TCPSessionCreator.listen(listenPort, reg);
      }
      catch (BEEPException be)
      {
        log.error("BEEP exception thrown", be);
      }
    }

Now if I run another instance of the server on the same port, I obviously
get a BindException thrown internally, but I can't trap that as all I
receive in the above code is a BEEPException with no cause set. This is one
example but there are probably many other different situations, where the
underlying cause might need to be available?