#17 Improve Sender.java to use nested exceptions

open
nobody
None
5
2012-10-08
2008-12-13
No

In Sender.java, nested exceptions are not used. This means that the exception that caused the problem is tossed out, making diagnosis difficult.

This patch improves the exception handling in Sender.java so that it propagates the original exception as a nested exception.

There may be other places in Saxon that need this improvement, but Sender.java is the one that was affecting me.

Discussion

  • Trevor Harmon

    Trevor Harmon - 2008-12-13
     
  • Michael Kay

    Michael Kay - 2008-12-13

    Thanks, I'll incorporate these. There's one I'm not quite sure about: the common case of an XML parser error around line 416. I'm not sure it's right to both include the nested exception and append its message. The standard error listener takes care of this by only appending the message from the nested exception if it's not already there in the primary message, but it still feels questionable.

     
  • Nobody/Anonymous

    "I'm not sure it's right to both include the nested exception and append its message."

    If it were me, I would remove the appending of the message and leave the nesting of the exception.

     


Anonymous

Cancel  Add attachments





Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks