Uploaded image for project: 'Magnolia Javascript Models'
  1. Magnolia Javascript Models
  2. JSMODELS-22

JavascriptRenderingModel hides ScriptException message

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 1.1.2
    • 1.1.1
    • magnolia cloud 5.7.2

      If a Javascript model creation fails with a ScriptException, the ScriptException messages is not logged.

      The message logged looks like

      RenderException: java.lang.UnsupportedOperationException: Javascript model could not be created. Please check your logs to find out why.

      But there are no messages in the logs that would allow to find the reason.

      The line 72 should be changed from

      log.warn("Error occurred during evaluation of the script (script path: [{}])", JavascriptObjectFactory.resolvePath(definition), e.getMessage()); 
      

      to

      log.warn("Error occurred during evaluation of the script (script path: [{}]): {}", JavascriptObjectFactory.resolvePath(definition), e.getMessage()); 
      

        Acceptance criteria

              fgrilli Federico Grilli
              azavodnik Andrey Zavodnik
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD