Well I think only Exception could be the only case needed. However,
catching generic Exception means any error, a specific Exception
caught is better,
BTW, the catch(Error e) {} stuff has been caught by IntelliJ Inspections.
Just one more thing that I noted in the class, there are no log
statements. Dom't we need them?
On Tue, Jan 19, 2010 at 8:42 PM, Alan D. Cabrera <[email protected]> wrote:
> org.apache.mina.transport.socket.apr.AprIoProcessor
>
>
> Regards,
> Alan
>
> On Jan 19, 2010, at 6:44 AM, Ashish wrote:
>
>> Where did u pulled this out from ?
>>
>> On Tue, Jan 19, 2010 at 8:11 PM, Alan D. Cabrera <[email protected]>
>> wrote:
>>>
>>> try {
>>> doSomeStuff();
>>> } catch (RuntimeException e) {
>>> throw e;
>>> } catch (Error e) {
>>> throw e;
>>> } catch (Exception e) {
>>> throw new RuntimeIoException("Failed to create a pollset.", e);
>>> } finally {
>>> cleanUp();
>>> }
>>>
>>> What's the point in catching and re-throwing RuntimeException and Error?
>>>
>>>
>>> Regards,
>>> Alan
>>>
>>>
>>>
>>
>>
>>
>> --
>> thanks
>> ashish
>>
>> Blog: http://www.ashishpaliwal.com/blog
>> My Photo Galleries: http://www.pbase.com/ashishpaliwal
>
>
--
thanks
ashish
Blog: http://www.ashishpaliwal.com/blog
My Photo Galleries: http://www.pbase.com/ashishpaliwal