Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-15951

Refactoring errors are not handled properly

    XMLWordPrintable

Details

    • Unknown

    Description

      Some errors might be lost when using the RefactoringScriptService, if the job cannot be created.
      Reproduction step:

      • Edit the RefactoringScriptService code to call the execution of a job with an unknown hint (such as calling copy with RefactoringJobs.COPY_AS)
      • Build the project and try to execute the copy

      Expected result:
      You get an exception for the component not found.

      Actual result:
      You only get a "request not found error" (see screenshots)

      There is different places to fix this error: first, the copy template should be fixed to display an exception. Then, the exception is well catch in RefactoringScriptService#execute and stored using setError. But apparently, the context is popped out when we might want to display it, making impossible to call getLastError to display it.

       The error is reproduced for copy job, but it should be fixed for all other refactorings, so errors handling should be checked in the associated templates.

      Attachments

        Activity

          People

            Unassigned Unassigned
            surli Simon Urli
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: