Skip to content
This repository was archived by the owner on Jan 16, 2021. It is now read-only.

Commit f2d2d5f

Browse files
committed
Re-throw exception when using main thread continuation block.
1 parent 54336a7 commit f2d2d5f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

ParseFacebookUtils/Internal/PFFacebookPrivateUtilities.m

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,12 @@ - (instancetype)pffb_continueWithMainThreadBooleanBlock:(PFBooleanResultBlock)bl
8484
}
8585

8686
- (instancetype)pffb_continueWithMainThreadBlock:(BFContinuationBlock)block {
87-
return [self continueWithExecutor:[BFExecutor mainThreadExecutor] withBlock:block];
87+
return [self continueWithExecutor:[BFExecutor mainThreadExecutor] withBlock:^id(BFTask *task) {
88+
if (task.exception) {
89+
@throw task.exception;
90+
}
91+
return block(task);
92+
}];
8893
}
8994

9095
@end

0 commit comments

Comments
 (0)