summaryrefslogtreecommitdiffstats
path: root/src/BluetoothManager.cpp
diff options
context:
space:
mode:
authorPetre Eftime <[email protected]>2016-02-29 15:15:19 +0200
committerPetre Eftime <[email protected]>2016-02-29 16:02:43 +0200
commit2f0c16965544fa9c46c3e0f8655250f3de29b586 (patch)
tree3010d8ec4efcc348a36e6fd158526b6b4604d4aa /src/BluetoothManager.cpp
parent1dc1523df41fa83b62a1f91fc706b1062d2add46 (diff)
Add checkinit which tests if library loads ok and manager initialization completes; return 0 if everything is ok, 1 for expected errors, linking errors should return 127v0.3.3
Fix Travis clang exclusion Signed-off-by: Petre Eftime <[email protected]>
Diffstat (limited to 'src/BluetoothManager.cpp')
-rw-r--r--src/BluetoothManager.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/BluetoothManager.cpp b/src/BluetoothManager.cpp
index b0338242..7cf9d374 100644
--- a/src/BluetoothManager.cpp
+++ b/src/BluetoothManager.cpp
@@ -182,10 +182,11 @@ BluetoothManager::BluetoothManager() : event_list()
NULL, /* GCancellable */
&error);
- if (gdbus_manager == NULL) {
- g_printerr("Error getting object manager client: %s",
- error->message);
- g_error_free(error);
+ if (gdbus_manager == nullptr) {
+ std::string error_str("Error getting object manager client: ");
+ error_str += error->message;
+ g_error_free(error);
+ throw std::runtime_error(error_str);
}
g_thread_new(NULL, init_manager_thread, gdbus_manager);