From 33a02b12239a9dd1ee6e41ab4de07a544c7aa6ae Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Thu, 9 May 2024 18:34:32 +0100 Subject: Require a reason when throwing an exception. --- include/anope.h | 7 ------- include/modules.h | 2 ++ 2 files changed, 2 insertions(+), 7 deletions(-) (limited to 'include') 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. -- cgit