Anope IRC Services  Version 2.0
Public Member Functions | Protected Attributes
CoreException Class Reference

#include <anope.h>

Inheritance diagram for CoreException:
Inheritance graph
Collaboration diagram for CoreException:
Collaboration graph

Public Member Functions

 CoreException ()
 CoreException (const Anope::string &message)
 CoreException (const Anope::string &message, const Anope::string &src)
virtual ~CoreException () throw ()
virtual const Anope::stringGetReason () const
virtual const Anope::stringGetSource () const

Protected Attributes

Anope::string err
Anope::string source

Detailed Description

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 644 of file anope.h.

Constructor & Destructor Documentation

◆ CoreException() [1/3]

CoreException::CoreException ( )

Default constructor, just uses the error mesage 'Core threw an exception'.

Definition at line 656 of file anope.h.

◆ CoreException() [2/3]

CoreException::CoreException ( const Anope::string message)

This constructor can be used to specify an error message before throwing.

Definition at line 659 of file anope.h.

◆ CoreException() [3/3]

CoreException::CoreException ( const Anope::string message,
const Anope::string src 

This constructor can be used to specify an error message before throwing, and to specify the source of the exception.

Definition at line 663 of file anope.h.

◆ ~CoreException()

virtual CoreException::~CoreException ( )
throw (

This destructor solves world hunger, cancels the world debt, and causes the world to end. Actually no, it does nothing. Never mind.


Definition at line 668 of file anope.h.

Member Function Documentation

◆ GetReason()

virtual const Anope::string& CoreException::GetReason ( ) const

◆ GetSource()

virtual const Anope::string& CoreException::GetSource ( ) const

Definition at line 677 of file anope.h.

Field Documentation

◆ err

Anope::string CoreException::err

Holds the error message to be displayed

Definition at line 649 of file anope.h.

Referenced by LDAPInterface::~LDAPInterface().

◆ source

Anope::string CoreException::source

Source of the exception

Definition at line 652 of file anope.h.

The documentation for this class was generated from the following file: