| Index: device/bluetooth/bluetooth_adapter_mac.mm
|
| diff --git a/device/bluetooth/bluetooth_adapter_mac.mm b/device/bluetooth/bluetooth_adapter_mac.mm
|
| index 667bbd6e06425cd14a23461624b662165cbff694..7ecac69a5de80fbd65ff1be6ca84927c90c777ff 100644
|
| --- a/device/bluetooth/bluetooth_adapter_mac.mm
|
| +++ b/device/bluetooth/bluetooth_adapter_mac.mm
|
| @@ -674,11 +674,9 @@ void BluetoothAdapterMac::DidFailToConnectPeripheral(CBPeripheral* peripheral,
|
| BluetoothDevice::ConnectErrorCode::ERROR_UNKNOWN;
|
| if (error) {
|
| error_code = BluetoothDeviceMac::GetConnectErrorCodeFromNSError(error);
|
| - VLOG(1) << "Converting Bluetooth error, domain: " << error.domain.UTF8String
|
| - << ", error code: " << error.code << ", to: " << error_code;
|
| }
|
| VLOG(1) << *device_mac << ": Failed to connect to peripheral with error "
|
| - << error;
|
| + << error << ", error code: " << error_code;
|
| device_mac->DidFailToConnectGatt(error_code);
|
| }
|
|
|
| @@ -726,4 +724,14 @@ bool BluetoothAdapterMac::DoesCollideWithKnownDevice(
|
| return false;
|
| }
|
|
|
| +DEVICE_BLUETOOTH_EXPORT std::ostream& operator<<(std::ostream& out,
|
| + NSError* error) {
|
| + if (!error) {
|
| + return out << "no error";
|
| + }
|
| + return out << "error domain: " << base::SysNSStringToUTF8(error.domain)
|
| + << ", code: " << std::to_string(error.code) << ", description: "
|
| + << base::SysNSStringToUTF8(error.localizedDescription);
|
| +}
|
| +
|
| } // namespace device
|
|
|