aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2017-10-07 14:04:28 +0200
committerSzczepan Zalega <szczepan@nitrokey.com>2017-10-07 14:04:28 +0200
commit44548b27880371c5fc927b6c463d693f03e2e5d1 (patch)
tree61d078fdf3cde72645fe9c3edeb91b45db17ff27
parent544f69c3e8cd744db0b8f20aade475159fef1d5e (diff)
downloadlibnitrokey-44548b27880371c5fc927b6c463d693f03e2e5d1.tar.gz
libnitrokey-44548b27880371c5fc927b6c463d693f03e2e5d1.tar.bz2
Correct exception type
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
-rw-r--r--NitrokeyManager.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/NitrokeyManager.cc b/NitrokeyManager.cc
index 0d702eb..a03ef53 100644
--- a/NitrokeyManager.cc
+++ b/NitrokeyManager.cc
@@ -724,9 +724,8 @@ using nitrokey::misc::strcpyT;
}
DeviceModel NitrokeyManager::get_connected_device_model() const{
- //FIXME throw if no device is connected or return unknown/unconnected value
if (device == nullptr){
- throw std::runtime_error("device not connected");
+ throw DeviceNotConnected("device not connected");
}
return device->get_device_model();
}