#include <anope.h>
Inherited by ConfigException, ConvertException, DatabaseException, ModuleException, RegexException, and SocketException.

Public Member Functions | |
| CoreException () | |
| CoreException (const Anope::string &message) | |
| CoreException (const Anope::string &message, const Anope::string &src) | |
| virtual | ~CoreException () throw () |
| virtual const Anope::string & | GetReason () const |
| virtual const Anope::string & | GetSource () const |
Protected Attributes | |
| Anope::string | err |
| Anope::string | source |
This class can be used on its own to represent an exception, or derived to represent a module-specific exception. When a module whishes to abort, e.g. within a constructor, it should throw an exception using ModuleException or a class derived from ModuleException. If a module throws an exception during its constructor, the module will not 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.
Definition at line 637 of file anope.h.
| CoreException::CoreException | ( | ) | [inline] |
| CoreException::CoreException | ( | const Anope::string & | message | ) | [inline] |
| CoreException::CoreException | ( | const Anope::string & | message, | |
| const Anope::string & | src | |||
| ) | [inline] |
| virtual CoreException::~CoreException | ( | ) | throw () [inline, virtual] |
| virtual const Anope::string& CoreException::GetReason | ( | ) | const [inline, virtual] |
Returns the reason for the exception. The module should probably put something informative here as the user will see this upon failure.
Definition at line 665 of file anope.h.
References err.
Referenced by CSAccess::CSAccess(), CommandOSAKill::DoAdd(), CSTop::DoTop(), CommandOSReload::Execute(), CommandOSConfig::Execute(), MyManager::HandlePacket(), Anope::HandleSignal(), Anope::Init(), XLine::InitRegex(), ModuleManager::LoadModule(), main(), Anope::Match(), ModuleProxyScan::ModuleProxyScan(), CommandOSSQLine::OnAdd(), CommandOSSNLine::OnAdd(), NSIdentifyLDAP::OnCheckAuthentication(), OnDatabaseReadMetadata(), LDAPOper::OnNickIdentify(), NSIdentifyLDAP::OnNickIdentify(), NSIdentifyLDAP::OnNickRegister(), ModuleSQLite::OnReload(), ModuleProxyScan::OnReload(), ModuleSQL::OnReload(), ModuleLDAP::OnReload(), HTTPD::OnReload(), ModuleDNS::OnReload(), OnIdentifyInterface::OnResult(), IdentifyInterface::OnResult(), ModuleProxyScan::OnUserConnect(), ModuleDNSBL::OnUserConnect(), OSDefcon::OSDefcon(), ClientSocket::Process(), ConnectionSocket::Process(), ListenSocket::ProcessRead(), ReadDatabase(), MyManager::SetIPPort(), and ReconnectTimer::Tick().
| virtual const Anope::string& CoreException::GetSource | ( | ) | const [inline, virtual] |
Anope::string CoreException::err [protected] |
Holds the error message to be displayed
Definition at line 642 of file anope.h.
Referenced by GetReason().
Anope::string CoreException::source [protected] |
1.7.1