BFTask+Exceptions.h 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * Copyright (c) 2016, Facebook, Inc.
  3. * All rights reserved.
  4. *
  5. * This source code is licensed under the BSD-style license found in the
  6. * LICENSE file in the root directory of this source tree. An additional grant
  7. * of patent rights can be found in the PATENTS file in the same directory.
  8. */
  9. #pragma once
  10. #import <Foundation/Foundation.h>
  11. NS_ASSUME_NONNULL_BEGIN
  12. /**
  13. Returns whether all instances of `BFTask` should automatically @try/@catch exceptions in continuation blocks. Default: `YES`.
  14. @return Boolean value indicating whether exceptions are being caught.
  15. */
  16. extern BOOL BFTaskCatchesExceptions(void)
  17. __attribute__((deprecated("This is temporary API and will be removed in a future release.")));
  18. /**
  19. Set whether all instances of `BFTask` should automatically @try/@catch exceptions in continuation blocks. Default: `YES`.
  20. @param catchExceptions Boolean value indicating whether exceptions shoudl be caught.
  21. */
  22. extern void BFTaskSetCatchesExceptions(BOOL catchExceptions)
  23. __attribute__((deprecated("This is a temporary API and will be removed in a future release.")));
  24. NS_ASSUME_NONNULL_END