Griffon
  1. Griffon
  2. GRIFFON-407

Exception within closure of an action is suppressed

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.3
    • Fix Version/s: 0.9.4
    • Component/s: None
    • Labels:
      None
    • Environment:
      linux
    • Number of attachments :
      0

      Description

      I tried the example in http://www.manning.com/almiray/Almiray_MEAPch01_free.pdf
      using griffon 0.9.3

      Somehow the createMVCGroup within the openfile on Page 17 didn't work.
      But I didn't know what was wrong.
      After some attempts I decided to use griffon 0.9.2 and it told me what was wrong - see console snapshot below.

      The problem is, with griffon 0.9.3 no such Information was provided.

      Knowing the problem i added e.g. a "callMethodThatDoesNotExist()" to the closure of the action surrounded with "println".
      When triggering the action, the closure-Code stopped at the unknown code but did not provide any Exception.
      I suppose the Exception is caught somewhere in 0.9.3 by mistake.

      Without getting provided an Exception it is nearly impossible to figure out the real problem.

      ------
      $ griffon run-app
      Welcome to Griffon 0.9.2 - http://griffon.codehaus.org/
      Licensed under Apache Standard License 2.0
      Griffon home is set to: /opt/griffon/griffon-0.9.2

      Base Directory: /home/wittmannm/exp/griffon/groovyEdit
      Resolving dependencies...
      Dependencies resolved in 614ms.
      Running script /opt/griffon/griffon-0.9.2/scripts/RunApp.groovy
      Environment set to development
      2011-09-08 10:52:07,381 [Thread-1] ERROR griffon.util.GriffonExceptionHandler - Uncaught Exception
      java.lang.IllegalArgumentException: Unknown MVC type "FilePanel". Known types are [filePanel, groovyEdit]
      at org.codehaus.griffon.runtime.util.GriffonApplicationHelper.buildMVCGroup(GriffonApplicationHelper.groovy:257)
      at org.codehaus.griffon.runtime.util.GriffonApplicationHelper$buildMVCGroup.callStatic(Unknown Source)
      at org.codehaus.griffon.runtime.util.GriffonApplicationHelper.createMVCGroup(GriffonApplicationHelper.groovy:247)
      at org.codehaus.griffon.runtime.util.GriffonApplicationHelper$createMVCGroup$0.callStatic(Unknown Source)
      at org.codehaus.griffon.runtime.util.GriffonApplicationHelper.createMVCGroup(GriffonApplicationHelper.groovy:239)
      at org.codehaus.griffon.runtime.core.AbstractGriffonMvcArtifact.createMVCGroup(AbstractGriffonMvcArtifact.java:80)
      at groovyedit.GroovyEditController$_closure1_closure3.doCall(GroovyEditController.groovy:21)
      at groovyedit.GroovyEditController$_closure1_closure3.doCall(GroovyEditController.groovy)

        Issue Links

          Activity

          Hide
          Martin Wittmann-Funk added a comment -

          I added a Note with the lowercase-Problem with 0.9.3 to the forum of the book:
          http://www.manning-sandbox.com/thread.jspa?threadID=46272

          Show
          Martin Wittmann-Funk added a comment - I added a Note with the lowercase-Problem with 0.9.3 to the forum of the book: http://www.manning-sandbox.com/thread.jspa?threadID=46272
          Hide
          Andres Almiray added a comment -

          The underlying cause is ExecutorService. It will swallow any exceptions (http://stackoverflow.com/questions/2459194/no-output-from-exception). It used to work before to because versions previous to 0.9.3 would spin a new Thread rather than rely on a fixed ThreadPool.

          Show
          Andres Almiray added a comment - The underlying cause is ExecutorService. It will swallow any exceptions ( http://stackoverflow.com/questions/2459194/no-output-from-exception ). It used to work before to because versions previous to 0.9.3 would spin a new Thread rather than rely on a fixed ThreadPool.

            People

            • Assignee:
              Andres Almiray
              Reporter:
              Martin Wittmann-Funk
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: