On Sun, Jan 18, 2009 at 4:19 AM, Rahul Akolkar <[email protected]> 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: [email protected]
For additional commands, e-mail: [email protected]