> The output from the following script on my system is:
>
> dfraser$ groovy -cp ../lib/mysql-connector-java-5.1.18-bin.jar
> Poptool.groovy
> fizz
> in loop
> [hang]
>
> It doesn't actually exit or print anything else.
>
> Do you see a problem?
>
> If I remove the throw, it gets to about 11500 rows and then hangs, probably
> due to an exception, and I'm not sure why because there is no error message!
>
> --snip--
>
> package com.company.poptool
>
> import groovy.sql.Sql
>
> def sql = Sql.newInstance("jdbc:mysql://localhost:3306/pop", "user",
> "pass", "com.mysql.jdbc.Driver")
>
> sql.withStatement{ stmt -> stmt.fetchSize = Integer.MIN_VALUE }
>
> def archiveTable = 'arch_2012-01-16'
> def count = 0;
>
> println("fizz")
> sql.eachRow("select * from `${Sql.expand archiveTable}`") { row ->
> count ++
> println("in loop")
> if (count % 100 == 0) {
> println count
> }
> throw new IllegalArgumentException("boo!")
> }
> println("buzz")
>
>
>
> --
> View this message in context:
http://groovy.329449.n5.nabble.com/No-errors-exceptions-when-using-Sql-eachRow-in-Groovy-1-8-5-tp5451985p5453942.html> Sent from the groovy - user mailing list archive at
Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>
http://xircles.codehaus.org/manage_email>
>