Re: CamelService initialisation errors getting lost



Michael Gratton escribiu:
> Sergio Villar Senin wrote:
>> That error is reported when trying to set the account to online mode. I
>> checked that as you say we set a generic error. What we could do in that
>> case is check if there is any exception stored in the private field of
>> the TnyCamelStoreAccount, and translate that CamelException to a proper
>> TnyError. Would that be suitable for you?
> 
> Yeah, that would be useful. Would it be possible to have the
> CamelException id and message passed through?

You can have the message but not the CamelException id. Note that
tinymail is a set of interfaces and it cannot expose anything related to
Camel which is the default implementation.

> What made the error particularly annoying to track down was that the
> Camel error occurred somewhat before Tinymail reported the problem
> (during account initialisation vs the first attempt to use the account
> object), so it took a bit of wading through Tiny's guts to work out
> where the problem was actually occurring.
> 
> It would be nice if Tinymail reported the Camel error as soon as it
> happened, rather than much later. TnyCamelStoreAccount's CamelException
> instance seems to get cleared at a number of points in the code, so I
> wonder if not reporting the Camel error immediately would lead to the
> wrong information being coerced into a TnyError.

The reason why you get it "late" is because the error is only reported
when you try to do some operation that involves an account ready to be
used. Don't know why it was done this way in the beginning, maybe Philip
can say something about this.

Br


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]