From f354851747d74c18872a4d30c7997355637320e3 Mon Sep 17 00:00:00 2001 From: Grant Limberg Date: Thu, 20 Apr 2023 07:40:04 -0700 Subject: [PATCH] increment error counter on throw --- controller/ConnectionPool.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/controller/ConnectionPool.hpp b/controller/ConnectionPool.hpp index 86d2d7221..b8e076087 100644 --- a/controller/ConnectionPool.hpp +++ b/controller/ConnectionPool.hpp @@ -106,6 +106,7 @@ public: _pool_in_use++; return std::static_pointer_cast(conn); } catch (std::exception &e) { + _pool_errors++; throw ConnectionUnavailable(); } } else { @@ -121,11 +122,13 @@ public: return std::static_pointer_cast(conn); } catch(std::exception& e) { // Error creating a replacement connection + _pool_errors++; throw ConnectionUnavailable(); } } } // Nothing available + _pool_errors++; throw ConnectionUnavailable(); } }