summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-12 13:01:06 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-12 13:01:06 +0000
commit4917b48d84d52218fc040713d4ecf1a0aea20f4f (patch)
tree9c74a8a8c002b523f317acaa8c07cfccc356b4f5
parent45fe5e1683e170056bb70854ad7893edac89cfbc (diff)
Add exception handling here
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4361 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/modules/m_testcommand.cpp12
1 files changed, 10 insertions, 2 deletions
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());
+ }
}
};