groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jochen Theodorou <>
Subject Re: "Not handled exceptions" inspection?
Date Thu, 24 Mar 2016 13:32:51 GMT

On 23.03.2016 22:37, Libor Jelinek wrote:
> Hello Groovy community!
> Is there some tool like groovyc warning / IDEA inspections / CodeNarc
> that will report situation when some method declares exception but you
> (a method user) don't re-declare nor catch it.
> I find it extremely useful. Because if for Groovy are exceptions are
> unchecked, it effectively negates all benefits of have exceptions. To be
> honest exceptions are the only part of Java that I really miss in Groovy.

The benefit of exceptions is not, that you are then reminded of having 
to catch them, but that they allow you to jump out of faulty code to 
error handling places. But anyway.. no, the compiler does not check 
that. I guess you could write a transform or an extension to the type 
checker to add such a check. But there are no plans for anything like 
that atm

bye Jochen

View raw message