summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2024-05-09 18:34:32 +0100
committerSadie Powell <sadie@witchery.services>2024-05-09 18:37:16 +0100
commit33a02b12239a9dd1ee6e41ab4de07a544c7aa6ae (patch)
treefb93d5e649c276b41ccb58751c4a195aeebcb2df /include
parent68f4556609569a33c4fcf1bf67402db292d4bdeb (diff)
Require a reason when throwing an exception.
Diffstat (limited to 'include')
-rw-r--r--include/anope.h7
-rw-r--r--include/modules.h2
2 files changed, 2 insertions, 7 deletions
diff --git a/include/anope.h b/include/anope.h
index 942952857..8d58acdce 100644
--- a/include/anope.h
+++ b/include/anope.h
@@ -717,9 +717,6 @@ protected:
*/
Anope::string source;
public:
- /** Default constructor, just uses the error message 'Core threw an exception'.
- */
- CoreException() : err("Core threw an exception"), source("The core") { }
/** This constructor can be used to specify an error message before throwing.
*/
CoreException(const Anope::string &message) : err(message), source("The core") { }
@@ -750,10 +747,6 @@ class CoreExport ModuleException
: public CoreException
{
public:
- /** Default constructor, just uses the error message 'Module threw an exception'.
- */
- ModuleException() : CoreException("Module threw an exception", "A Module") { }
-
/** This constructor can be used to specify an error message before throwing.
*/
ModuleException(const Anope::string &message) : CoreException(message, "A Module") { }
diff --git a/include/modules.h b/include/modules.h
index 8723e623c..e26c0b4cf 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -199,6 +199,8 @@ public:
class CoreExport NotImplementedException final
: public CoreException
{
+public:
+ NotImplementedException() : CoreException("") { }
};
/** Every module in Anope is actually a class.