diff options
author | Petre Eftime <[email protected]> | 2016-05-23 17:42:28 +0300 |
---|---|---|
committer | Petre Eftime <[email protected]> | 2016-05-23 18:17:45 +0300 |
commit | f475d6dbcc549022920090ac11d783f011ffc010 (patch) | |
tree | f32e3139295fe4d0e7031c1b106f8eac12e1b4ea /src/BluetoothManager.cpp | |
parent | b98d8d7ad75d748596ee0246b6f21a74f4b61ef3 (diff) |
c++, java: Add BluetoothException, throw it on DBus or BlueZ error
Signed-off-by: Petre Eftime <[email protected]>
Diffstat (limited to 'src/BluetoothManager.cpp')
-rw-r--r-- | src/BluetoothManager.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/BluetoothManager.cpp b/src/BluetoothManager.cpp index 8de8003c..a7459f4a 100644 --- a/src/BluetoothManager.cpp +++ b/src/BluetoothManager.cpp @@ -30,6 +30,7 @@ #include "BluetoothGattCharacteristic.hpp" #include "BluetoothGattDescriptor.hpp" #include "BluetoothEvent.hpp" +#include "BluetoothException.hpp" #include "version.h" #include <pthread.h> @@ -293,7 +294,7 @@ BluetoothManager::BluetoothManager() : event_list() g_list_free_full(objects, g_object_unref); if (default_adapter == nullptr) { - throw std::runtime_error("No adapter installed or not recognized by system"); + throw BluetoothException("No adapter installed or not recognized by system"); } } |