Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2243)

Unified Diff: device/bluetooth/bluetooth_low_energy_device_mac.mm

Issue 2784373003: bluetooth: macOS: Adding explicit function to log NSError (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: device/bluetooth/bluetooth_low_energy_device_mac.mm
diff --git a/device/bluetooth/bluetooth_low_energy_device_mac.mm b/device/bluetooth/bluetooth_low_energy_device_mac.mm
index 8683ba76ae77b372d4f8617bc097811153481834..8257e30d999e222c19364efb6d19ca8e1e37099e 100644
--- a/device/bluetooth/bluetooth_low_energy_device_mac.mm
+++ b/device/bluetooth/bluetooth_low_energy_device_mac.mm
@@ -201,7 +201,8 @@ void BluetoothLowEnergyDeviceMac::DidDiscoverPrimaryServices(NSError* error) {
// TODO(http://crbug.com/609320): Need to pass the error.
// TODO(http://crbug.com/609844): Decide what to do if discover failed
// a device services.
- VLOG(1) << *this << ": Can't discover primary services: " << error;
+ VLOG(1) << *this << ": Can't discover primary services: "
+ << BluetoothAdapterMac::String(error);
return;
}
@@ -245,7 +246,8 @@ void BluetoothLowEnergyDeviceMac::DidDiscoverCharacteristics(
if (error) {
// TODO(http://crbug.com/609320): Need to pass the error.
// TODO(http://crbug.com/609844): Decide what to do if discover failed
- VLOG(1) << *this << ": Can't discover characteristics: " << error;
+ VLOG(1) << *this << ": Can't discover characteristics: "
+ << BluetoothAdapterMac::String(error);
return;
}
@@ -316,7 +318,8 @@ void BluetoothLowEnergyDeviceMac::DidDiscoverDescriptors(
if (error) {
// TODO(http://crbug.com/609320): Need to pass the error.
// TODO(http://crbug.com/609844): Decide what to do if discover failed
- VLOG(1) << *this << ": Can't discover descriptors: " << error;
+ VLOG(1) << *this << ": Can't discover descriptors: "
+ << BluetoothAdapterMac::String(error);
return;
}
if (!IsGattConnected()) {
@@ -402,7 +405,8 @@ BluetoothLowEnergyDeviceMac::GetBluetoothRemoteGattService(
void BluetoothLowEnergyDeviceMac::DidDisconnectPeripheral(NSError* error) {
VLOG(1) << *this << ": Disconnected from peripheral.";
if (error) {
- VLOG(1) << *this << ": Bluetooth error: " << error;
+ VLOG(1) << *this
+ << ": Bluetooth error: " << BluetoothAdapterMac::String(error);
}
SetGattServicesDiscoveryComplete(false);
// Removing all services at once to ensure that calling GetGattService on
« no previous file with comments | « device/bluetooth/bluetooth_adapter_mac.mm ('k') | device/bluetooth/bluetooth_remote_gatt_characteristic_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698