aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--java/direct_bt/tinyb/DBTDevice.java4
-rw-r--r--src/direct_bt/GATTHandler.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/java/direct_bt/tinyb/DBTDevice.java b/java/direct_bt/tinyb/DBTDevice.java
index 6b1bdd0e..65301141 100644
--- a/java/direct_bt/tinyb/DBTDevice.java
+++ b/java/direct_bt/tinyb/DBTDevice.java
@@ -593,8 +593,8 @@ public class DBTDevice extends DBTObject implements BluetoothDevice
updateServiceCache(services);
return services;
} catch (final Throwable t) {
+ System.err.println("DBTDevice.getServices(): Caught "+t.getMessage()+" on thread "+Thread.currentThread().toString()+" on "+toString());
if(DEBUG) {
- System.err.println("Caught "+t.getMessage()+" on thread "+Thread.currentThread().toString());
t.printStackTrace();
}
}
@@ -607,8 +607,8 @@ public class DBTDevice extends DBTObject implements BluetoothDevice
try {
return pingGATTImpl();
} catch (final Throwable t) {
+ System.err.println("DBTDevice.pingGATT(): Caught "+t.getMessage()+" on thread "+Thread.currentThread().toString()+" on "+toString());
if(DEBUG) {
- System.err.println("Caught "+t.getMessage()+" on thread "+Thread.currentThread().toString());
t.printStackTrace();
}
}
diff --git a/src/direct_bt/GATTHandler.cpp b/src/direct_bt/GATTHandler.cpp
index e4067efd..c73ada13 100644
--- a/src/direct_bt/GATTHandler.cpp
+++ b/src/direct_bt/GATTHandler.cpp
@@ -412,9 +412,9 @@ std::shared_ptr<const AttPDUMsg> GATTHandler::sendWithReply(const AttPDUMsg & ms
std::shared_ptr<const AttPDUMsg> res = attPDURing.getBlocking(timeout);
if( nullptr == res ) {
errno = ETIMEDOUT;
- ERR_PRINT("GATTHandler::send: nullptr result (timeout): req %s to %s", msg.toString().c_str(), deviceString.c_str());
+ ERR_PRINT("GATTHandler::send: nullptr result (timeout %d): req %s to %s", timeout, msg.toString().c_str(), deviceString.c_str());
disconnect(true /* disconnectDevice */, true /* ioErrorCause */);
- throw BluetoothException("GATTHandler::send: nullptr result (timeout): req "+msg.toString()+" to "+deviceString, E_FILE_LINE);
+ throw BluetoothException("GATTHandler::send: nullptr result (timeout "+std::to_string(timeout)+"): req "+msg.toString()+" to "+deviceString, E_FILE_LINE);
}
return res;
}