Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-2132

Filter stacktraces in the new shell

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.1-rc-1
    • None
    • None

    Description

      When things trigger some exceptions, those stacktraces should be filtered to just show the interesting bits to the user:

      C:\Documents and Settings\Guillaume Laforge>groovysh
      Groovy Shell (1.1-beta-3, JVM: 1.6.0_02-b06)
      Type 'help' or '\h' for help.
      -------------------------------------------------------------------------------------------------------------
      groovy:(0):000> random()
      001> random()
      ERROR groovy.lang.MissingMethodException: No signature of method: groovysh_evaluate.random() is applicable for
      argument types: () values: {}
      at groovy.lang.MetaClassImpl.invokeMissingMethod (MetaClassImpl.java:574)
      at groovy.lang.MetaClassImpl.invokeMissingMethod (MetaClassImpl.java:545)
      at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:787)
      at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:614)
      at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:537)
      at groovy.lang.GroovyObjectSupport.invokeMethod (GroovyObjectSupport.java:44)
      at groovy.lang.Script.invokeMethod (Script.java:78)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrentN (ScriptBytecodeAdapter.jav
      a:71)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrent0 (ScriptBytecodeAdapter.jav
      a:99)
      at groovysh_evaluate.run (groovysh_evaluate)
      ...
      groovy:(0):000>

      In this example, reducing it to that would be great:

      C:\Documents and Settings\Guillaume Laforge>groovysh
      Groovy Shell (1.1-beta-3, JVM: 1.6.0_02-b06)
      Type 'help' or '\h' for help.
      -------------------------------------------------------------------------------------------------------------
      groovy:(0):000> random()
      001> random()
      ERROR groovy.lang.MissingMethodException: No signature of method: groovysh_evaluate.random() is applicable for
      argument types: () values: {}
      ...
      groovy:(0):000>

      Attachments

        Activity

          People

            user57 Jason Dillon
            guillaume Guillaume Sauthier
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: