On Nov 25, 2007 7:44 AM, Bernd Fondermann
<[EMAIL PROTECTED]> wrote:
> On Nov 24, 2007 9:04 AM, Robert Burrell Donkin
>
> <[EMAIL PROTECTED]> wrote:
> > On Nov 21, 2007 4:30 PM, Robert Burrell Donkin
> > <[EMAIL PROTECTED]> wrote:
> > > i've committed the change from arrays to iterators. the next step is
> > > to switch torque to load the heavy data (body and headers) upon
> > > iteration.
> > >
> > > loading the heavy data may fail and this failure will occur not during
> > > the initial fetch but upon iteration. so, a strategy is needed to
> > > handle exceptions when this happens.
> > >
> > > a few options i can see immediately:
> > >
> > > 1. silently ignore and return null (doesn't sound like a good idea to me)
> > > 2. throw a RuntimeException (this will need to be documented and
> > > caught to avoid closing the client connection - so not one of my
> > > preferred option)
> > > 3. alter MessageResult (1) so that getters throw MessagingException.
> > > when an exception occurs upon iteration, wrap and throw when the data
> > > is requested. this will result in a much less elegant API and make
> > > MessageResult less useful.
> > > 4. add an exception getter to MessageResult (seems inelegant)
> > >
> > > opinions?
> > >
> > > anyone think of anything better?
> >
> > unless anyone jumps in with a better idea than or objections to 3,
> > i'll implement
>
> +1, that also my preferred solution.

committed

- robert

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to