hunk.code_window: An object representing an [asset](#asset).
   ### `MediaLibrary.saveToLibraryAsync(localUri)`
   Saves the file at given `localUri` to the user's media library. On **iOS 11+**, it's possible to use this method without asking for `CAMERA_ROLL` permission, however then yours `Info.plist` should have `NSPhotoLibraryAddUsageDescription` key.
   #### Arguments
  
hunk.labels: keep keep keep keep replace keep keep keep
hunk.after_edit: Saves the file at given `localUri` to the user's media library. Unlike [`createAssetAsync()`](#medialibrarycreateassetasynclocaluri), this method doesn't return created asset.
   On **iOS 11+**, it's possible to use this method without asking for `CAMERA_ROLL` permission, however then yours `Info.plist` should have `NSPhotoLibraryAddUsageDescription` key.
  
hunk.file_path: docs/pages/versions/v38.0.0/sdk/media-library.md
hunk.type: replace
file: /*
   * Copyright (c) Facebook, Inc. and its affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   */
  
  #include <gtest/gtest.h>
  
  #include <exception>
  #include <stdexcept>
  
  #include <cxxreact/RecoverableError.h>
  
  using namespace facebook::react;
  
  TEST(RecoverableError, RunRethrowingAsRecoverableRecoverTest) {
    try {
      RecoverableError::runRethrowingAsRecoverable<std::runtime_error>([]() {
          throw std::runtime_error("catch me");
        });
      FAIL() << "Unthrown exception";
    } catch (const RecoverableError &err) {
      ASSERT_STREQ(err.what(), "facebook::react::Recoverable: catch me");
    } catch (...) {
      FAIL() << "Uncaught exception";
    }
  }
  
  TEST(RecoverableError, RunRethrowingAsRecoverableFallthroughTest) {
    try {
      RecoverableError::runRethrowingAsRecoverable<std::runtime_error>([]() {
          throw std::logic_error("catch me");
        });
      FAIL() << "Unthrown exception";
    } catch (const RecoverableError &err) {
      FAIL() << "Recovered exception that should have fallen through";
    } catch (const std::exception &err) {
      ASSERT_STREQ(err.what(), "catch me");
    }
  }
  