Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-2171

AbstractTransform should not catch transformers exceptions

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.1.3.2
    • Fix Version/s: 5.2 M4
    • Component/s: Preview
    • Impact type:
      API change
    • Upgrade notes:
      Hide

      Update callers of the transform method to handle the thrown exception.

      Show
      Update callers of the transform method to handle the thrown exception.

      Description

      AbstractTransform should not catch transformer exception but throw them instead.

      This would allow the caller to handle it correctly and help the developers find which file attachment name in which Nuxeo document has triggered the problem.

      The AbstractTransform is indeed two deep in the call stack and has no idea of the Nuxeo document being transform and therefore cannot log all necessary data to make debugging easy.

      Fixing this problem requires an API change: add new throws declaration on the method:

      public List<TransformDocument> transform(
      Map<String, Map<String, Serializable>> options,
      TransformDocument... sources);

      Therefore this change cannot be implemented in the 5.1 branch.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 4 hours
                  4h
                  Remaining:
                  Remaining Estimate - 4 hours
                  4h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified