Path: csiph.com!usenet.pasdenom.info!aioe.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Robert Klemme Newsgroups: comp.lang.java.programmer Subject: Re: Primitive return value after exception in method Date: Sun, 08 Sep 2013 14:15:20 +0200 Lines: 32 Message-ID: References: <5222eb58$0$6555$9b4e6d93@newsspool4.arcor-online.net> <52236225$0$296$14726298@news.sunsite.dk> <522373f2$0$6568$9b4e6d93@newsspool3.arcor-online.net> <7PidnXF_D8rn_7HPnZ2dnUVZ8oidnZ2d@bt.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net 1mw7EokjzATV28Hpl/u1IA9aFXccgZeHOhtJOs5lIF8c4lNlo= Cancel-Lock: sha1:L8n7Jkhv6JjhSQEHpx+xS7d2E7Q= User-Agent: Mozilla/5.0 (Windows NT 6.0; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 In-Reply-To: <7PidnXF_D8rn_7HPnZ2dnUVZ8oidnZ2d@bt.com> X-Antivirus: avast! (VPS 130908-0, 08.09.2013), Outbound message X-Antivirus-Status: Clean Xref: csiph.com comp.lang.java.programmer:25254 On 08.09.2013 13:41, lipska the kat wrote: > On 08/09/13 11:33, Robert Klemme wrote: >> On 08.09.2013 10:12, lipska the kat wrote: >>> On 02/09/13 07:34, Robert Klemme wrote: >> >>>> One can pass values back to the caller in this situation even in Java - >>>> albeit not via return value. All you need to do is to pass an object >>>> reference into the method and modify the state of that object before >>>> you >>>> throw the exception. >> >>> I've just read this thread and frankly I'm surprised that apparently >>> experienced developers are apparently suggesting that this sort of thing >>> is even attempted. >> >> Where do you see that? > > Where do I see what? That "experienced developers are apparently suggesting that this sort of thing is even attempted". We're discussing language behavior in this thread. I do not see that someone is seriously suggesting to actually do that and return values even in case of an exception. That's why I asked. robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/