NSError *error; if (![context save:&error]) { // Handle the error. } 转载于:https://www.cnblogs.com/wcLT/p/5062604.html