ns_error_util.h 798 B

12345678910111213141516171819202122232425
  1. // Copyright 2015 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef BASE_IOS_NS_ERROR_UTIL_H_
  5. #define BASE_IOS_NS_ERROR_UTIL_H_
  6. @class NSError;
  7. namespace base {
  8. namespace ios {
  9. // Iterates through |error|'s underlying errors and returns the first error for
  10. // which there is no underlying error.
  11. NSError* GetFinalUnderlyingErrorFromError(NSError* error);
  12. // Returns a copy of |original_error| with |underlying_error| appended to the
  13. // end of its underlying error chain.
  14. NSError* ErrorWithAppendedUnderlyingError(NSError* original_error,
  15. NSError* underlying_error);
  16. } // namespace ios
  17. } // namespace base
  18. #endif // BASE_IOS_NS_ERROR_UTIL_H_