summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-11-14 18:50:50 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-11-14 18:50:50 +0000
commit9f35df1ad1599f62f040261fec821b703a3643af (patch)
tree91ec7d3a3f16ac71713d81d3e6c2d28587939e8d
parent17e639d072b008d9bf6deca20d67f132c2b5c1df (diff)
Inherit ModuleException from std::exception rather than classbase
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5740 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--include/modules.h5
-rw-r--r--src/modules/m_helpop.cpp1
-rw-r--r--src/modules/m_randquote.cpp2
3 files changed, 6 insertions, 2 deletions
diff --git a/include/modules.h b/include/modules.h
index 481929595..818ef88cd 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -313,7 +313,7 @@ class Event : public ModuleMessage
* be loaded. If this happens, the error message returned by ModuleException::GetReason will be displayed to the user
* attempting to load the module, or dumped to the console if the ircd is currently loading for the first time.
*/
-class ModuleException : public classbase
+class ModuleException : public std::exception
{
private:
/** Holds the error message to be displayed
@@ -328,8 +328,9 @@ class ModuleException : public classbase
ModuleException(std::string message) : err(message) {}
/** This destructor solves world hunger, cancels the world debt, and causes the world to end.
* Actually no, it does nothing. Never mind.
+ * @throws Nothing!
*/
- virtual ~ModuleException() {};
+ virtual ~ModuleException() throw() {};
/** Returns the reason for the exception.
* The module should probably put something informative here as the user will see this upon failure.
*/
diff --git a/src/modules/m_helpop.cpp b/src/modules/m_helpop.cpp
index f5fce322b..22bd3619b 100644
--- a/src/modules/m_helpop.cpp
+++ b/src/modules/m_helpop.cpp
@@ -192,6 +192,7 @@ class HelpopException : public ModuleException
std::string err;
public:
HelpopException(std::string message) : err(message) { }
+ ~HelpopException() throw() { };
virtual const char* GetReason() { return err.c_str(); }
};
diff --git a/src/modules/m_randquote.cpp b/src/modules/m_randquote.cpp
index 7354420a9..35fb02085 100644
--- a/src/modules/m_randquote.cpp
+++ b/src/modules/m_randquote.cpp
@@ -70,6 +70,8 @@ class RandquoteException : public ModuleException
public:
RandquoteException(const std::string &message) : err(message) { }
+ ~RandquoteException() throw () { }
+
virtual const char* GetReason()
{
return err.c_str();