blob: bd5f2b9d38fbf5e8d90075bfbc49a40036444b54 [file] [log] [blame]
Tommi09ca02e2016-04-24 17:32:48 +02001/*
2 * Copyright 2016 The WebRTC Project Authors. All rights reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
Mirko Bonadei99a70a22018-10-09 16:45:14 +020011#include "rtc_base/logging_mac.h"
Tommi09ca02e2016-04-24 17:32:48 +020012
13#import <Foundation/Foundation.h>
14
Tommi09ca02e2016-04-24 17:32:48 +020015namespace rtc {
16std::string DescriptionFromOSStatus(OSStatus err) {
17 NSError* error =
18 [NSError errorWithDomain:NSOSStatusErrorDomain code:err userInfo:nil];
19 return error.description.UTF8String;
20}
Mirko Bonadei99a70a22018-10-09 16:45:14 +020021
Tommi09ca02e2016-04-24 17:32:48 +020022} // namespace rtc