From 0231736746bb113e89ed55537d13e93ff49a3678 Mon Sep 17 00:00:00 2001 From: Davin McCall Date: Mon, 13 Jun 2016 00:21:09 +0100 Subject: [PATCH] Catch a broader range of exceptions when creating a ControlConn --- src/dinit.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dinit.cc b/src/dinit.cc index a82f502..daaa0a0 100644 --- a/src/dinit.cc +++ b/src/dinit.cc @@ -444,8 +444,8 @@ static void control_socket_cb(EventLoop_t *loop, int sockfd) try { new ControlConn(loop, service_set, newfd); // will delete itself when it's finished } - catch (std::bad_alloc &bad_alloc_exc) { - log(LogLevel::ERROR, "Accepting control connection: Out of memory"); + catch (std::exception &exc) { + log(LogLevel::ERROR, "Accepting control connection: ", exc.what()); close(newfd); } } -- 2.25.1