Uploaded image for project: 'Cocoon'
  1. Cocoon
  2. COCOON-1205

JS Errors are not handled correctly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.1.8
    • None
    • - Flowscript
    • None
    • Operating System: other
      Platform: Other
    • 29998

    Description

      When throwing an Error in JS as at
      http://cvs.apache.org/viewcvs.cgi/cocoon-2.1/src/blocks/authentication-fw/samples/flow/sample.js?annotate=1.5#81
      or
      http://cvs.apache.org/viewcvs.cgi/cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/flow/javascript/Form.js?annotate=1.18#167
      you will only get an error message like
      "file:/home/jheinicke/development/ERAK/erak/webapp/flow/authentication.js", line
      81: Invalid JavaScript value of type org.mozilla.javascript.UniqueTag.

      This means the file and line info are correctly provided, but not the error
      message or the error itself. When viewing the call stack while remote debugging
      the error object does still exist at
      org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(ContinuationInterpreter.java:1503),
      so I guess somewhere there is the error.

      Would be nice if someone familiar with our continuations code can have a look at it.

      Joerg

      Stacktrace:
      org.mozilla.javascript.EvaluatorException:
      "file:/home/jheinicke/development/ERAK/erak/webapp/flow/authentication.js", line
      81: Invalid JavaScript value of type org.mozilla.javascript.UniqueTag
      at
      org.apache.cocoon.components.flow.javascript.JSErrorReporter.runtimeError(JSErrorReporter.java:66)
      at org.mozilla.javascript.Context.reportRuntimeError(Context.java:588)
      at org.mozilla.javascript.Context.reportRuntimeError(Context.java:627)
      at org.mozilla.javascript.Context.reportRuntimeError1(Context.java:603)
      at org.mozilla.javascript.ScriptRuntime.errorWithClassName(ScriptRuntime.java:2128)
      at org.mozilla.javascript.ScriptRuntime.toNumber(ScriptRuntime.java:144)
      at org.mozilla.javascript.Context.toNumber(Context.java:1170)
      at
      org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(ContinuationInterpreter.java:1503)
      at
      org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(ContinuationInterpreter.java:190)
      at
      org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(ContinuationInterpreter.java:138)
      at
      org.mozilla.javascript.continuations.InterpretedFunctionImpl.call(InterpretedFunctionImpl.java:121)
      at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1244)
      at
      org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.callFunction(FOM_JavaScriptInterpreter.java:702)

      Attachments

        Activity

          People

            Unassigned Unassigned
            joerg.heinicke@gmx.de Jörg Heinicke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: