commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jochen Wiedmann" <jochen.wiedm...@gmail.com>
Subject Re: [fileupload] svn commit: r735370
Date Sun, 18 Jan 2009 13:24:55 GMT
On Sun, Jan 18, 2009 at 4:19 AM, Rahul Akolkar <rahul.akolkar@gmail.com> wrote:

>> +        } finally {
>> +            if (!successful) {
>> +                for (Iterator iterator = items.iterator(); iterator.hasNext();)
{
>> +                    FileItem fileItem = (FileItem) iterator.next();
>> +                    try {
>> +                        fileItem.delete();
>> +                    } catch (Throwable e) {
>> +                        // ignore it
>> +                    }
>
>
> Catch the bits that makes sense to ignore here?

Don't know, whether I understand your question right, Rahul. But if
the question is, whether ignoring the exception in the finally clause
is fine: Yes, it is! If the flag "successful" isn't set, then another
exception was thrown previously, and we want to see that exception,
not a follow-up.

Jochen

-- 
I have always wished for my computer to be as easy to use as my
telephone; my wish has come true because I can no longer figure out
how to use my telephone.

    -- (Bjarne Stroustrup,
http://www.research.att.com/~bs/bs_faq.html#really-say-that
       My guess: Nokia E50)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message