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

#include <anope.h>

Inheritance diagram for CoreException:
Inheritance graph
[legend]
Collaboration diagram for CoreException:
Collaboration graph
[legend]

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::CoreException ( )
inline

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

Definition at line 656 of file anope.h.

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

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

Definition at line 659 of file anope.h.

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

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.

virtual CoreException::~CoreException ( )
throw (
)
inlinevirtual

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

Exceptions
Nothing!

Definition at line 668 of file anope.h.

Member Function Documentation

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

Definition at line 677 of file anope.h.

References source.

Field Documentation

Anope::string CoreException::err
protected

Holds the error message to be displayed

Definition at line 649 of file anope.h.

Referenced by GetReason().

Anope::string CoreException::source
protected

Source of the exception

Definition at line 652 of file anope.h.

Referenced by GetSource().


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