CR: clarify comment

pull/1/head
Michael Kirk 7 years ago
parent f5efa9ee90
commit 9f35b93647

@ -48,13 +48,14 @@ NSString *const OWSOperationKeyIsFinished = @"isFinished";
// Called one time only // Called one time only
- (nullable NSError *)checkForPreconditionError - (nullable NSError *)checkForPreconditionError
{ {
// OWSOperation have a notion of failure, which is inferred by the presence of a `failingError`.
//
// By default, any failing dependency cascades that failure to it's dependent.
// If you'd like different behavior, override this method (`checkForPreconditionError`) without calling `super`.
for (NSOperation *dependency in self.dependencies) { for (NSOperation *dependency in self.dependencies) {
if (![dependency isKindOfClass:[OWSOperation class]]) { if (![dependency isKindOfClass:[OWSOperation class]]) {
// If you want an operation to have a cascading failure, it must // Native operations, like NSOperation and NSBlockOperation have no notion of "failure".
// subclass OWSOperation. // So there's no `failingError` to cascade.
//
// Native operations like NSOperation or NSBlockOperation don't
// don't support this feature.
continue; continue;
} }

Loading…
Cancel
Save