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
|