bpp-phyl3  3.0.0
bpp::NodeException Class Reference

General exception thrown when something is wrong with a particular node. More...

#include <Bpp/Phyl/Tree/TreeExceptions.h>

+ Inheritance diagram for bpp::NodeException:
+ Collaboration diagram for bpp::NodeException:

Public Member Functions

 NodeException (const std::string &text, int nodeId)
 Build a new NodePException. More...
 
virtual ~NodeException ()
 
virtual int getNodeId () const
 Get the id of node that threw the exception. More...
 
const char * what () const noexcept override
 
const std::string & message () const noexcept
 

Protected Attributes

int nodeId_
 

Private Attributes

std::string message_
 

Detailed Description

General exception thrown when something is wrong with a particular node.

Definition at line 23 of file TreeExceptions.h.

Constructor & Destructor Documentation

◆ NodeException()

bpp::NodeException::NodeException ( const std::string &  text,
int  nodeId 
)
inline

Build a new NodePException.

Parameters
textA message to be passed to the exception hierarchy.
nodeIdThe id of the node that threw the exception.

Definition at line 35 of file TreeExceptions.h.

References toString().

◆ ~NodeException()

virtual bpp::NodeException::~NodeException ( )
inlinevirtual

Definition at line 39 of file TreeExceptions.h.

Member Function Documentation

◆ getNodeId()

virtual int bpp::NodeException::getNodeId ( ) const
inlinevirtual

Get the id of node that threw the exception.

Returns
The id of the faulty node.

Reimplemented in bpp::NodePException.

Definition at line 47 of file TreeExceptions.h.

References nodeId_.

Member Data Documentation

◆ nodeId_

int bpp::NodeException::nodeId_
protected

Definition at line 27 of file TreeExceptions.h.

Referenced by getNodeId(), and bpp::NodePException::getNodeId().


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