-
Notifications
You must be signed in to change notification settings - Fork 576
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #251 from BoltsFramework/nlutsenko.exceptions
Deprecate BFTask automatic exception catching.
- Loading branch information
Showing
10 changed files
with
183 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Copyright (c) 2016, Facebook, Inc. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the BSD-style license found in the | ||
* LICENSE file in the root directory of this source tree. An additional grant | ||
* of patent rights can be found in the PATENTS file in the same directory. | ||
*/ | ||
|
||
#pragma once | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
/** | ||
Returns whether all instances of `BFTask` should automatically @try/@catch exceptions in continuation blocks. Default: `YES`. | ||
@return Boolean value indicating whether exceptions are being caught. | ||
*/ | ||
extern BOOL BFTaskCatchesExceptions(void) | ||
__attribute__((deprecated("This is temporary API and will be removed in a future release."))); | ||
|
||
/** | ||
Set whether all instances of `BFTask` should automatically @try/@catch exceptions in continuation blocks. Default: `YES`. | ||
@param catchExceptions Boolean value indicating whether exceptions shoudl be caught. | ||
*/ | ||
extern void BFTaskSetCatchesExceptions(BOOL catchExceptions) | ||
__attribute__((deprecated("This is a temporary API and will be removed in a future release."))); | ||
|
||
NS_ASSUME_NONNULL_END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* Copyright (c) 2016, Facebook, Inc. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the BSD-style license found in the | ||
* LICENSE file in the root directory of this source tree. An additional grant | ||
* of patent rights can be found in the PATENTS file in the same directory. | ||
*/ | ||
|
||
#import "BFTask+Exceptions.h" | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
static BOOL taskCatchExceptions = YES; | ||
|
||
BOOL BFTaskCatchesExceptions(void) { | ||
return taskCatchExceptions; | ||
} | ||
|
||
void BFTaskSetCatchesExceptions(BOOL catchExceptions) { | ||
taskCatchExceptions = catchExceptions; | ||
} | ||
|
||
NS_ASSUME_NONNULL_END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.