Re: About the compiler optimization of Groovy

2016-10-12 Thread daniel_sun
Hi Jochen, > Tail recursion: see TailRecursive. But I don't see this as an optimization Yeah, that is what I want :) > instead of first creating a GString and then cast it to String, we could > instead produce the String right away We could try to optimize it in the later release. > As for a pl

[PROGRESS REPORT 20161012]groovy-parser

2016-10-12 Thread daniel_sun
rs, Daniel.Sun -- View this message in context: http://groovy.329449.n5.nabble.com/PROGRESS-REPORT-20161012-groovy-parser-tp5736074.html Sent from the Groovy Dev mailing list archive at Nabble.com.

Re: [PROGRESS REPORT 20161012]groovy-parser

2016-10-12 Thread Sergei Egorov
e :) > > Cheers, > Daniel.Sun > > > > -- > View this message in context: > http://groovy.329449.n5.nabble.com/PROGRESS-REPORT-20161012-groovy-parser-tp5736074.html > Sent from the Groovy Dev mailing list archive at Nabble.com. >

Re: [PROGRESS REPORT 20161012]groovy-parser

2016-10-12 Thread daniel_sun
ions, *Sergei Egorov* who helped me fix the 3 failing test cases related to MacroGroovy, *Cédric Champeau* who offered me a new CI instance :) Cheers, Daniel.Sun -- View this message in context: http://groovy.329449.n5.nabble.com/PROGRESS-REPORT-20161012-groovy-parser-tp5736074.html Sent from the

Re: [PROGRESS REPORT 20161012]groovy-parser

2016-10-12 Thread daniel_sun
.nabble.com/PROGRESS-REPORT-20161012-groovy-parser-tp5736074p5736077.html Sent from the Groovy Dev mailing list archive at Nabble.com.

non-catchable exception?

2016-10-12 Thread o...@ocs.cz
Hello there, is it possible to create an exception which will *not* be caught by a general handler, only by a specific one? So that e.g., the following code === class MySpecialException extends Exception { /* whatever magic needed here */ } ... def foo() { throw new MySpecialException() } def

Re: non-catchable exception?

2016-10-12 Thread Søren Berg Glasius
This question should be asked in us...@groovy.apache.org And the answer to the question must be, no. But you could check if } catch (exception) { if(exception instance MySpecialException) throw exception println "bar caught $exception" } Best regards, Søren Berg Glasius Hedevej 1, Gl.

Re: non-catchable exception?

2016-10-12 Thread Dinko Srkoč
On 12 October 2016 at 18:27, Søren Berg Glasius wrote: > This question should be asked in us...@groovy.apache.org > > And the answer to the question must be, no. But you could check if Well, strictly speaking, that's not quite true ;-) @groovy.transform.InheritConstructors class MySpecialExc

Re: non-catchable exception?

2016-10-12 Thread Jim White
The recommended way to have an exception that can't be caught except in specifically intended places is to extend java.lang.Throwable (or if appropriate to the use case, java.lang.Error). Those work just like Exception except that they don't have to be declared in the method signatures where they

Re: non-catchable exception?

2016-10-12 Thread OC
Thanks alot to all! My bad: I completely forgot that “catch (foo)” implies Exception foo, and not Throwable foo. OC On 12. 10. 2016, at 18:59, Jim White wrote: > The recommended way to have an exception that can't be caught except in > specifically intended places is to extend java.lang.Throwa