cloudmine/cloudmine-ios — pull request #15 by conradev (2012-06-21 19:55:24+00:00)
Title: Error propagation

Logging
-----------

Errors are now more verbose in the console. General errors are logged in `CMWebService` (e.g. an error occurred in an object request), specific errors are logged in `CMStore` (e.g. these specific objects weren't found).

Error objects
-------------------

`CMStoreResponse` now has an `error` property. When an error occurs, it is created in `CMWebService`, and passed to `CMStore`, where it is put in an empty `CMStoreResponse`. The developer can then check this error property to figure out what went wrong. The error objects have a set of possible `CMErrorCode`s, all under the `CMErrorDomain`. Also, if the error was triggered by ASIHTTPRequest or YAJL, the original error is included in the new error's `userInfo` dictionary.

Not included
------------------

`CMUser` actions do not have this fancy error object propagation yet. However, this is not a huge deal because `CMUser` actions actually have a `CMUserAccountResult`, something `CMStore` was not fortunate enough to have. The `CMUser` operations do have verbose logs, though.