From 992f5e2545c969634e309e6aee29b50ec3dcf1e1 Mon Sep 17 00:00:00 2001 From: om Date: Sat, 12 Aug 2006 15:32:51 +0000 Subject: Catch exceptions from SQLresolver git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4910 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/extra/m_pgsql.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/modules/extra/m_pgsql.cpp b/src/modules/extra/m_pgsql.cpp index c4bf1da99..0a8c1fd11 100644 --- a/src/modules/extra/m_pgsql.cpp +++ b/src/modules/extra/m_pgsql.cpp @@ -575,9 +575,16 @@ public: /* Conversion failed, assume it's a host */ SQLresolver* resolver; - resolver = new SQLresolver(this, ServerInstance, host); - - ServerInstance->AddResolver(resolver); + try + { + resolver = new SQLresolver(this, ServerInstance, host); + + ServerInstance->AddResolver(resolver); + } + catch(...) + { + ServerInstance->Log(DEBUG, "Couldn't make a SQLresolver..this connection is gonna diiiiiie...actually we just won't create it"); + } } else { -- cgit v1.2.3