Skip to content
Snippets Groups Projects
Commit 55ec93cf authored by Andreas Kempe's avatar Andreas Kempe
Browse files

lib: l2cap_socket: use errno_exception helper from blue::util

parent 5d4194b3
No related branches found
No related tags found
No related merge requests found
......@@ -12,6 +12,7 @@
#include "cap_l2cap.h"
#include "bdaddr.h"
#include "util/system_error.h"
namespace blue::l2cap
{
......@@ -23,8 +24,7 @@ l2cap_listen_socket::l2cap_listen_socket(util::shared_cap_chan chan,
l2cap_watcher(loop)
{
if (fd == -1)
throw std::runtime_error("Could not listen on L2CAP socket:" +
std::string(strerror(errno)));
throw util::errno_exception("Could not listen on L2CAP socket");
l2cap_watcher.set<l2cap_listen_socket,
&l2cap_listen_socket::io_callback>(this);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment