CamelService initialisation errors getting lost




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.

It would also be nice if the CamelException maintained by TnyCamelAccount was accessible so it could be queried and logged. Is there some way to do this already? I couldn't see any public accessor for the exception instance.

//Mike

--
⎊ michael gratton, itinerant geek
⎈ <http://web.vee.net/>



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