Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Robert Klemme Newsgroups: comp.lang.java.programmer Subject: Re: Way to avoid repeating to catch the same exception in overridden method Date: Fri, 23 Oct 2015 08:59:27 +0200 Lines: 19 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net C+JCkPZy3eXOVCoM5wQMRAV+VTFn4O6Fr0P7uuCSMuuVwBTaQ= Cancel-Lock: sha1:RcNHLX92ldhzVOPMf/b2yme/YaA= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 In-Reply-To: Xref: csiph.com comp.lang.java.programmer:32928 On 19.10.2015 18:11, Eric Sosman wrote: > My big question, though, is about the exception itself. Why > in the name of all that's holy does a no-argument method throw an > exception that complains about an illegal argument? Which one of > its non-existent arguments is it complaining about? And even if that exception was legitimate, since it's a RuntimeException, which typically indicates a programmer error, it is questionable to catch it here. Of course that can only be decided with more context but it is at least worthwhile to ponder. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/