aboutsummaryrefslogtreecommitdiffstats
path: root/examples/java/HelloTinyB.java
diff options
context:
space:
mode:
authorPetre Eftime <[email protected]>2016-09-28 12:54:08 +0300
committerPetre Eftime <[email protected]>2016-09-28 12:54:08 +0300
commitd9c777bc576b5365c2064d55fe872f272faa92e8 (patch)
treeb0baebd226cd28836a4fb9622e055701ffa48fe8 /examples/java/HelloTinyB.java
parent22c1af1c7f1a47207668ba61ceccea2143500069 (diff)
examples: java: Stopping discovery can sometimes fail
Signed-off-by: Petre Eftime <[email protected]>
Diffstat (limited to 'examples/java/HelloTinyB.java')
-rw-r--r--examples/java/HelloTinyB.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/java/HelloTinyB.java b/examples/java/HelloTinyB.java
index 64725b9d..b3d2c934 100644
--- a/examples/java/HelloTinyB.java
+++ b/examples/java/HelloTinyB.java
@@ -120,7 +120,11 @@ public class HelloTinyB {
/*
* After we find the device we can stop looking for other devices.
*/
- manager.stopDiscovery();
+ try {
+ manager.stopDiscovery();
+ } catch (BluetoothException e) {
+ System.err.println("Discovery could not be stopped.");
+ }
if (sensor == null) {
System.err.println("No sensor found with the provided address.");