Re: [ANNOUNCE] Groovy 2.4.10 Windows Installer Released

2017-03-19 Thread Paul King
That was quick! Nice work! :-) On Mon, Mar 20, 2017 at 1:47 PM, Keegan Witt wrote: > The Windows installer for Groovy 2.4.10 is available from the usual place: > https://bintray.com/groovy/Distributions/download_file?file_path=groovy-2.4.10-installer.exe > > > -Keegan

[ANNOUNCE] Groovy 2.4.10 Windows Installer Released

2017-03-19 Thread Keegan Witt
The Windows installer for Groovy 2.4.10 is available from the usual place: https://bintray.com/groovy/Distributions/download_file?file_path=groovy-2.4.10-installer.exe -Keegan

Re: ScriptException does not prints actual file name

2017-03-19 Thread Edmond Kemokai
Hi Harish, You are right, the script name is just a somewhat random identifier. In that case if you really must know the source file that caused the issue and you are executing the groovy code, why don't you capture the resulting exception and perhaps replace the Script.groovy with the name of the

Re: ScriptException does not prints actual file name

2017-03-19 Thread Jochen Theodorou
On 19.03.2017 17:29, Harish Dewan wrote: Hi Edmond, thanks for your reply. the unique number which i was talking about is not the line number. for example: below is an script exception thrown in case of syntax error. I had introduced text 'abcd' in my hello.groovy script. in case of exception it

Re: ScriptException does not prints actual file name

2017-03-19 Thread Harish Dewan
Hi Edmond, thanks for your reply. the unique number which i was talking about is not the line number. for example: below is an script exception thrown in case of syntax error. I had introduced text 'abcd' in my hello.groovy script. in case of exception it says below message javax.script.ScriptExce

Re: float/double calculation bug ?

2017-03-19 Thread Søren Berg Glasius
You are running into Floating point rounding in the JVM, which is not a Groovy bug. Your code can be salvaged by using BigDecimal: def calc = { amount, ttl -> BigDecimal rtn if (amount[-1] != '%') rtn = amount.toBigDecimal() else rtn = ttl / 100.0 * amount.replaceAll(/%\Z/, '').toBigD

Re: float/double calculation bug ?

2017-03-19 Thread Søren Berg Glasius
Hi, This discussion does not belong on the dev mailing list, but the user mailing list (*users@groovy.apache.org )*. Please continue your very interesting discussion there :-) Thanks. /Søren On Sun, 19 Mar 2017 at 16:47 James Bond wrote: What happens if you use .toDouble() instead of .toFloat,