#316 Specific exceptions to indicate CC failures

open
nobody
3
2010-04-17
2010-04-08
Ernst de Haan
No

Currently, when a CustomCallingConvention fails to convert a request or a response, the only options for generating an exception is to produce an IOException. This is the only (checked) exception thrown by the convertRequestImpl(...) and convertResultImpl(...) methods.

However, I have seen several situations where the cause for the failure is not at all related to an I/O error. In such cases I would rather just throw a specific exception instead, like a ConvertRequestException and a ConvertResultException, respectively.

I will attach a proposed implementation.

Discussion

  • Ernst de Haan
    Ernst de Haan
    2010-04-08

    ConvertRequestException.java

     
  • Ernst de Haan
    Ernst de Haan
    2010-04-08

    ConvertResultException.java

     
  • Ernst de Haan
    Ernst de Haan
    2010-04-08

    Note that the current code already contains the following comment in CallingConvention.java, version 1.107:

    // XXX: Replace IOException with more appropriate exception?

     
  • Ernst de Haan
    Ernst de Haan
    2010-04-08

    Modified CallingConvention.java file, based on v1.107. Backwards compatible.

     
  • Ernst de Haan
    Ernst de Haan
    2010-04-08

    • priority: 5 --> 6
    • assigned_to: nobody --> agoubard
     
  • Ernst de Haan
    Ernst de Haan
    2010-04-08

    Note that the proposed implementation also implements RFEs 2984100 and 2984092.

    @Anthony: Can you review the RFEs and the proposed implementation?

     
    • priority: 6 --> 3
     
    • assigned_to: agoubard --> nobody
     
  • Note that this RFE breaks compatibility but still in consideration for XINS 3.0.