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

Incomprehensible Error Message Passing Partial Evaluated Lambda Function

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • groovy-runtime
    • None

    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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              russel Dr. Russel Winder
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: