NSError *error;
if (![context save:&error]) {
    // Handle the error.
}