diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-02-19 14:53:06 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-02-19 14:53:06 +0000 |
commit | 6824a483e3bc4a584b998929ac066dda2ae24c8b (patch) | |
tree | 9e1837d8031169781029b65cb7e4796f15c422e6 /src/helperfuncs.cpp | |
parent | 99e1325d666d9617217cc44d48c1a1c381e83f21 (diff) |
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
Diffstat (limited to 'src/helperfuncs.cpp')
-rw-r--r-- | src/helperfuncs.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
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()); \ } |