Line numbers from Groovy source in stack traces

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Line numbers from Groovy source in stack traces

Tomas Hubalek-3
Hello all,

would it be possible to add line numbers (in groovy file) into stack
trace that is thrown from groovy source code?

Currently there is only text "(Unknown source)". Is there some compiler
switch and/or is it possible to implement into groovy compiler?

Thanks
Tom
Reply | Threaded
Open this post in threaded view
|

Re: Line numbers from Groovy source in stack traces

Jochen Theodorou
Tomas Hubalek schrieb:

> Hello all,
>
> would it be possible to add line numbers (in groovy file) into stack
> trace that is thrown from groovy source code?
>
> Currently there is only text "(Unknown source)". Is there some compiler
> switch and/or is it possible to implement into groovy compiler?

that is because you are using a version of groovy with a bug. This
should be fixed in jsr-05, I added a test to ensure it will not happen
again.

bye blackdrag
Reply | Threaded
Open this post in threaded view
|

Re: Line numbers from Groovy source in stack traces

Tomas Hubalek-3
I'm using JSR-03, so it is maybe the reason... Thanks for answer...

Tom

Jochen Theodorou napsal(a):

> Tomas Hubalek schrieb:
>
>> Hello all,
>>
>> would it be possible to add line numbers (in groovy file) into stack
>> trace that is thrown from groovy source code?
>>
>> Currently there is only text "(Unknown source)". Is there some
>> compiler switch and/or is it possible to implement into groovy compiler?
>
>
> that is because you are using a version of groovy with a bug. This
> should be fixed in jsr-05, I added a test to ensure it will not happen
> again.
>
> bye blackdrag
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Line numbers from Groovy source in stack traces

Jochen Theodorou
Tomas Hubalek schrieb:

> I'm using JSR-03, so it is maybe the reason... Thanks for answer...
[...]
>> that is because you are using a version of groovy with a bug. This
>> should be fixed in jsr-05, I added a test to ensure it will not happen
>> again.

I'm sorry, this should be fixed in the alst release which was jsr-04 not
05 ;)

bye blackdrag
Reply | Threaded
Open this post in threaded view
|

Re: Line numbers from Groovy source in stack traces

Guillaume Laforge
Administrator
In reply to this post by Tomas Hubalek-3
On 14/12/05, Tomas Hubalek <[hidden email]> wrote:
> I'm using JSR-03, so it is maybe the reason... Thanks for answer...

JSR-04 has many more line numbers in the bytecode.
And the last remaining ones should be there in the next release.

You can try a snapshot of JSR-05 if you wish to try:
http://distci.codehaus.org/groovy/jars/

You'll be able to tell us if your missing line number info is still missing.
Thanks in advance.

--
Guillaume Laforge
Groovy Project Manager
http://glaforge.free.fr/blog/groovy