Uploaded image for project: 'Commons - Script'
  1. Commons - Script
  2. SCRIPT-21

Suppress Exception class in ScriptComplilationException message

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 1.5.0
    • Fix Version/s: 1.5.0
    • Component/s: common, groovy, javascript
    • Labels:
    • Sprint:
      OpenIDM Sprint 44

      Description

      When script compilation results in a compilation exception, the ScriptCompilationException is thrown with only the cause. When the exception is finally caught and handled and converted to a ResourceException, the original cause is part of the ResourceException message:

      {
          "code":400,
          "reason":"Bad Request",
          "message":"org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:\n42F7AD688B3BABA10C0756122E7C8AC52B20D22B: 1: expecting EOF, found ',' @ line 1, column 14.\n return 'user', ]\n ^\n\n1 error\n"
      }
      

      We should construct the ScriptCompilationException better to avoid the classname in the message detail.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                brmiller Brendan Miller
                Reporter:
                brmiller Brendan Miller
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: