MTLManagedObjectAdapter: Fix a bug where errors are silently handled #220

Merged
merged 3 commits into from Jan 27, 2014

Conversation

Projects
None yet
2 participants
Member

kylef commented Jan 24, 2014

It was using error but this error is replaced later in the method and never passed as an error.

if (error != NULL) {
    *error = tmpError;
}
@kylef kylef MTLManagedObjectAdapter: Fix a bug where errors are silently handled
It was using `error` but this error is replaced later in the method and never
passed as an error.

```objective-c
if (error != NULL) {
    *error = tmpError;
}
```
e21c9c3
Owner

robb commented Jan 24, 2014

Thanks! 💖

Could you throw in a regression test for good measure?

Member

kylef commented Jan 24, 2014

Yes sorry I missed this, I made the change directly to fix failing tests locally to my project using Mantle. Will make similar tests for Mantle these over the weekend.

Owner

robb commented Jan 24, 2014

Cool, would you mind checking if it's still broken in 2.0-development?

On Jan 24, 2014, at 15:15, Kyle Fuller notifications@github.com wrote:

Yes sorry I missed this, I made the change directly to fix failing tests locally to my project using Mantle. Will make similar tests for Mantle these over the weekend.


Reply to this email directly or view it on GitHub.

kylef added some commits Jan 27, 2014

@kylef kylef MTLManagedObjectAdapter: Add tests for validating values 13a39ca
@kylef kylef MTLManagedObjectAdapter: Fixes an issue with validate for insert
Fixes an issue where validation for insert would return a deleted
managed object without an error

When it does this in combination with
`relationshipModelClassesByPropertyKey` CoreData could raise an
exception for using setting child’s in a different context (because it
doesn’t have a context)
027e8c1
Member

kylef commented Jan 27, 2014

@robb Added the test and also fixed a related error.

Both bug's are present in the 2.0 branch. Shall I submit another pull request for that branch too?

Owner

robb commented Jan 27, 2014

Both bug's are present in the 2.0 branch. Shall I submit another pull request for that branch too?

Nah, I can merge master into that branch and with the tests in place I'll know if I screwed up :-)

@robb robb added a commit that referenced this pull request Jan 27, 2014

@robb robb Merge pull request #220 from kylef/bug/managed-object-adapter/silent-…
…error

MTLManagedObjectAdapter: Fix a bug where errors are silently handled
61b3f66

@robb robb merged commit 61b3f66 into Mantle:master Jan 27, 2014

kylef deleted the unknown repository branch Jan 27, 2014

Member

kylef commented Jan 27, 2014

Awesome 👍.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment