From: Davin McCall Date: Sun, 12 Jun 2016 23:21:09 +0000 (+0100) Subject: Catch a broader range of exceptions when creating a ControlConn X-Git-Tag: v0.03~28 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0231736746bb113e89ed55537d13e93ff49a3678;p=oweals%2Fdinit.git Catch a broader range of exceptions when creating a ControlConn --- 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); } }