castor
  1. castor
  2. CASTOR-1549

Add cause exception to exceptions created in FieldHandlerImpl getValue()

    Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.3
    • Fix Version/s: 1.0.4
    • Component/s: XML
    • Labels:
      None
    • Environment:
      Java 1.5
    • Number of attachments :
      3

      Description

      We recently came across a problem with Castor 1.0.3 where there was an exception during a getValue on a field (due to a remote call). The
      exception was printed, but because of the way the IllegalStateExceptions were constructed, we could not get the causing exception (which had data we needed to accurately report the problem).

      I would like to propose a simple change: Add the exception to the wrapping IllegalStateException constructed in FieldHandlerImpl.getValue().

      I have attached a patch file for just that.

      I am using this is my project now, and it behaves as I expect. I can add a specific test case for this if desired.

      I will try to put together a simple code sample to produce the problem.

      1. CastorExceptionTest.java
        2 kB
        Paul Philion
      2. CastorExceptionTest.xml
        0.3 kB
        Paul Philion
      3. patch.txt
        1 kB
        Paul Philion

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Werner Guttmann
            Reporter:
            Paul Philion
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 5 minutes
              5m
              Remaining:
              Remaining Estimate - 5 minutes
              5m
              Logged:
              Time Spent - Not Specified
              Not Specified