Re: CamelService initialisation errors getting lost



Michael Gratton escribiu:
> 
> Hey,
> 
> After tracking down a generic error I was getting when creating a
> TnyCamelStoreAccount instance, it seems that any error when initialising
> a CamelService gets lost, or at least isn't accessible.
> 
> It turns out the call to camel_session_get_service() to get a
> CamelService in tny_camel_store_account_prepare
> (tny-camel-store-account.c:508), was failing. The CamelException
> instance that TnyCamelAccount maintains was getting set, but nothing was
> really done with it. So in the end the TnyCamelStoreAccount was not
> correctly initialised and further down the track a generic error was
> reported: "Internal error, account not ready".
> 
> So it seems like it would be really quite useful if
> tny_camel_store_account_prepare actually reported if an error had
> occurred obtaining the CamelSession. In this case above it was the cache
> directory not getting created due to a permission problem, which would
> be something the user might actually be able to fix.

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?

Br


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