From 6824a483e3bc4a584b998929ac066dda2ae24c8b Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 19 Feb 2006 14:53:06 +0000 Subject: Apparently to catch descendent classes we need to catch a reference to the parent, not the parent itself git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3242 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/helperfuncs.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/helperfuncs.cpp') diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp index 0255de227..c6e1bcd10 100644 --- a/src/helperfuncs.cpp +++ b/src/helperfuncs.cpp @@ -139,7 +139,7 @@ void Write_NoFormat(int sock, const char *text) { Config->GetIOHook(fd_ref_table[sock]->port)->OnRawSocketWrite(sock,tb,bytes); } - catch (ModuleException modexcept) + catch (ModuleException& modexcept) { log(DEBUG,"Module exception cought: %s",modexcept.GetReason()); \ } @@ -177,7 +177,7 @@ void Write(int sock,char *text, ...) { Config->GetIOHook(fd_ref_table[sock]->port)->OnRawSocketWrite(sock,tb,bytes); } - catch (ModuleException modexcept) + catch (ModuleException& modexcept) { log(DEBUG,"Module exception cought: %s",modexcept.GetReason()); \ } @@ -206,7 +206,7 @@ void WriteServ_NoFormat(int sock, const char* text) { Config->GetIOHook(fd_ref_table[sock]->port)->OnRawSocketWrite(sock,tb,bytes); } - catch (ModuleException modexcept) + catch (ModuleException& modexcept) { log(DEBUG,"Module exception cought: %s",modexcept.GetReason()); \ } @@ -246,7 +246,7 @@ void WriteServ(int sock, char* text, ...) { Config->GetIOHook(fd_ref_table[sock]->port)->OnRawSocketWrite(sock,tb,bytes); } - catch (ModuleException modexcept) + catch (ModuleException& modexcept) { log(DEBUG,"Module exception cought: %s",modexcept.GetReason()); \ } @@ -275,7 +275,7 @@ void WriteFrom_NoFormat(int sock, userrec *user, const char* text) { Config->GetIOHook(fd_ref_table[sock]->port)->OnRawSocketWrite(sock,tb,bytes); } - catch (ModuleException modexcept) + catch (ModuleException& modexcept) { log(DEBUG,"Module exception cought: %s",modexcept.GetReason()); \ } @@ -315,7 +315,7 @@ void WriteFrom(int sock, userrec *user,char* text, ...) { Config->GetIOHook(fd_ref_table[sock]->port)->OnRawSocketWrite(sock,tb,bytes); } - catch (ModuleException modexcept) + catch (ModuleException& modexcept) { log(DEBUG,"Module exception cought: %s",modexcept.GetReason()); \ } @@ -1386,7 +1386,7 @@ void ShowMOTD(userrec *user) { Config->GetIOHook(user->port)->OnRawSocketWrite(user->fd,(char*)WholeMOTD.c_str(),WholeMOTD.length()); } - catch (ModuleException modexcept) + catch (ModuleException& modexcept) { log(DEBUG,"Module exception cought: %s",modexcept.GetReason()); \ } -- cgit v1.3.1-10-gc9f91