When the failure failed, you (as a programmer) did something wrong.
I wrote some pretty complex Core-Data applications and have never seen a production failure.
Make sure that the values that users can enter can be saved without errors.
This means that if you have an optional relationship, do not accept the “Finish” button until the user selects an object for this relationship. Or set the default relationship object.
If you need NSString in a special format, check this line before accepting it.
This is more user friendly. If you tell him 10 minutes ago you did something wrong, thats why I will delete all your changes , will he think WTF? . If you tell him The value you try to enter is not in the correct format. Please use xxxxx The value you try to enter is not in the correct format. Please use xxxxx , he will think Ok, let change it.
And now, after you have made sure that salvation will never work, you can put [context rollback] , because you should never say never. But before you do this, you must ask the user if he wants to send you an error log. Because salvation should never fail.
Matthias bauch
source share