groovy
  1. groovy
  2. GROOVY-5376

Incomprehensible Error Message Passing Partial Evaluated Lambda Function

    Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: groovy-runtime
    • Labels:
      None
    • Number of attachments :
      0

      Description

      When executing the code:

      #! /usr/bin/env groovy
      
      import groovy.sql.DataSet
      import groovy.sql.Sql
      
      @Grab ( 'org.xerial:sqlite-jdbc:3.7.2' )
      @GrabConfig ( systemClassLoader = true )
      def database
      final words = [ ]
      try {
        database = Sql.newInstance ( 'jdbc:sqlite:database.db' , 'org.sqlite.JDBC' )
        final wordsTable = new DataSet ( database , 'words' )
        ( 0 ..< 4 ).each { i ->
          words << wordsTable.findAll ( { j , item -> item.id == j }.curry ( i ) ).firstRow ( ).word
        }
      }
      finally {
        database?.close ( )
      }
      println words.join ( '' )
      

      the result is the error:

      Caught: groovy.lang.GroovyRuntimeException: Could not find the ClassNode for MetaClass: groovy.lang.MetaClassImpl@6c1826dc[class org.codehaus.groovy.runtime.CurriedClosure]
      groovy.lang.GroovyRuntimeException: Could not find the ClassNode for MetaClass: groovy.lang.MetaClassImpl@6c1826dc[class org.codehaus.groovy.runtime.CurriedClosure]

      which doesn't really tell the programmer anything useful about the executed code they wrote.

        Issue Links

          Activity

          No work has yet been logged on this issue.

            People

            • Assignee:
              Unassigned
              Reporter:
              Russel Winder
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: