From 4917b48d84d52218fc040713d4ecf1a0aea20f4f Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 12 Jul 2006 13:01:06 +0000 Subject: Add exception handling here git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4361 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_testcommand.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/modules') diff --git a/src/modules/m_testcommand.cpp b/src/modules/m_testcommand.cpp index 53414424d..881024cc7 100644 --- a/src/modules/m_testcommand.cpp +++ b/src/modules/m_testcommand.cpp @@ -55,8 +55,16 @@ class cmd_woot : public command_t { /* We dont have to worry about deleting 'r', the core will * do it for us as required.*/ - MyResolver* r = new MyResolver("brainbox.ath.cx", true); - Srv->AddResolver(r); + + try + { + MyResolver* r = new MyResolver("brainbox.ath.cx", true); + Srv->AddResolver(r); + } + catch (ModuleException& e) + { + log(DEBUG,"Danger, will robinson! There was an exception: %s",e.GetReason()); + } } }; -- cgit v1.2.3