]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/userprocess.cpp
Decide that it wasn't quite appropriate :(
[user/henk/code/inspircd.git] / src / userprocess.cpp
index 5452b8f9e36bbd1191833a570381bd8a193dab8c..fae96721df0f4f09f72d5398935b85ff0dcc9a4c 100644 (file)
@@ -88,8 +88,16 @@ void ProcessUser(userrec* cu)
        if (Config->GetIOHook(cu->port))
        {
                int result2 = 0;
-               int MOD_RESULT = Config->GetIOHook(cu->port)->OnRawSocketRead(cu->fd,data,65535,result2);
-                log(DEBUG,"Data result returned by module: %d",MOD_RESULT);
+               int MOD_RESULT = 0;
+               try
+               {
+                       MOD_RESULT = Config->GetIOHook(cu->port)->OnRawSocketRead(cu->fd,data,65535,result2);
+                       log(DEBUG,"Data result returned by module: %d",MOD_RESULT);
+               }
+                catch (ModuleException& modexcept)
+                {
+                        log(DEBUG,"Module exception cought: %s",modexcept.GetReason()); \
+                }
                if (MOD_RESULT < 0)
                {
                        result = -EAGAIN;