Dash Core  0.12.2.1
P2P Digital Currency
CGovernanceException Class Reference

#include <governance-exceptions.h>

+ Inheritance diagram for CGovernanceException:

Public Member Functions

 CGovernanceException (const std::string &strMessageIn="", governance_exception_type_enum_t eTypeIn=GOVERNANCE_EXCEPTION_NONE, int nNodePenaltyIn=0)
 
virtual ~CGovernanceException () throw ()
 
virtual const char * what () const throw ()
 
const std::string & GetMessage () const
 
governance_exception_type_enum_t GetType () const
 
int GetNodePenalty () const
 

Private Attributes

std::string strMessage
 
governance_exception_type_enum_t eType
 
int nNodePenalty
 

Detailed Description

A class which encapsulates information about a governance exception condition

Derives from std::exception so is suitable for throwing (ie. will be caught by a std::exception handler) but may also be used as a normal object.

Definition at line 55 of file governance-exceptions.h.

Constructor & Destructor Documentation

◆ CGovernanceException()

CGovernanceException::CGovernanceException ( const std::string &  strMessageIn = "",
governance_exception_type_enum_t  eTypeIn = GOVERNANCE_EXCEPTION_NONE,
int  nNodePenaltyIn = 0 
)
inline

Definition at line 65 of file governance-exceptions.h.

◆ ~CGovernanceException()

virtual CGovernanceException::~CGovernanceException ( )
throw (
)
inlinevirtual

Definition at line 77 of file governance-exceptions.h.

Member Function Documentation

◆ GetMessage()

const std::string& CGovernanceException::GetMessage ( ) const
inline

Definition at line 84 of file governance-exceptions.h.

Referenced by gobject(), and voteraw().

◆ GetNodePenalty()

int CGovernanceException::GetNodePenalty ( ) const
inline

Definition at line 94 of file governance-exceptions.h.

Referenced by CGovernanceManager::ProcessMessage().

◆ GetType()

governance_exception_type_enum_t CGovernanceException::GetType ( ) const
inline

Definition at line 89 of file governance-exceptions.h.

◆ what()

virtual const char* CGovernanceException::what ( ) const
throw (
)
inlinevirtual

Member Data Documentation

◆ eType

governance_exception_type_enum_t CGovernanceException::eType
private

Definition at line 60 of file governance-exceptions.h.

Referenced by CGovernanceException(), and GetType().

◆ nNodePenalty

int CGovernanceException::nNodePenalty
private

Definition at line 62 of file governance-exceptions.h.

Referenced by GetNodePenalty().

◆ strMessage

std::string CGovernanceException::strMessage
private

Definition at line 58 of file governance-exceptions.h.

Referenced by CGovernanceException(), GetMessage(), and what().


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