bpp-phyl3  3.0.0
bpp::PhyloNodePException Class Reference

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

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

+ Inheritance diagram for bpp::PhyloNodePException:
+ Collaboration diagram for bpp::PhyloNodePException:

Public Member Functions

 PhyloNodePException (const std::string &text, const PhyloTree &tree, const std::shared_ptr< PhyloNode > node)
 Build a new PhyloNodePException. More...
 
 PhyloNodePException (const std::string &text, const PhyloNode *node)
 Build a new PhyloNodePException. More...
 
 PhyloNodePException (const std::string &text, uint nodeId)
 Build a new PhyloNodePException. More...
 
 PhyloNodePException (const PhyloNodePException &nex)
 
PhyloNodePExceptionoperator= (const PhyloNodePException &nex)
 
virtual ~PhyloNodePException ()
 
virtual const PhyloNodegetNode () const
 Get the node that threw the exception. More...
 
virtual uint 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

uint nodeId_
 

Private Attributes

const PhyloNodenode_
 
std::string message_
 

Detailed Description

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

Definition at line 56 of file PhyloTreeExceptions.h.

Constructor & Destructor Documentation

◆ PhyloNodePException() [1/4]

PhyloNodePException::PhyloNodePException ( const std::string &  text,
const PhyloTree tree,
const std::shared_ptr< PhyloNode node 
)

Build a new PhyloNodePException.

Parameters
textA message to be passed to the exception hierarchy.
treethe phyloTree owning the branch
nodeA const pointer toward the node that threw the exception.

Definition at line 17 of file PhyloTreeExceptions.cpp.

◆ PhyloNodePException() [2/4]

PhyloNodePException::PhyloNodePException ( const std::string &  text,
const PhyloNode node 
)

Build a new PhyloNodePException.

Parameters
textA message to be passed to the exception hierarchy.
nodeA const pointer toward the node that threw the exception.

Definition at line 23 of file PhyloTreeExceptions.cpp.

◆ PhyloNodePException() [3/4]

bpp::PhyloNodePException::PhyloNodePException ( const std::string &  text,
uint  nodeId 
)
inline

Build a new PhyloNodePException.

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

Definition at line 83 of file PhyloTreeExceptions.h.

◆ PhyloNodePException() [4/4]

bpp::PhyloNodePException::PhyloNodePException ( const PhyloNodePException nex)
inline

Definition at line 86 of file PhyloTreeExceptions.h.

◆ ~PhyloNodePException()

virtual bpp::PhyloNodePException::~PhyloNodePException ( )
inlinevirtual

Definition at line 98 of file PhyloTreeExceptions.h.

Member Function Documentation

◆ getNode()

virtual const PhyloNode* bpp::PhyloNodePException::getNode ( ) const
inlinevirtual

Get the node that threw the exception.

Returns
A pointer toward the faulty node.

Definition at line 106 of file PhyloTreeExceptions.h.

References node_.

◆ getNodeId()

virtual uint bpp::PhyloNodePException::getNodeId ( ) const
inlinevirtual

Get the id of node that threw the exception.

Returns
The id of the faulty node.

Reimplemented from bpp::PhyloNodeException.

Definition at line 112 of file PhyloTreeExceptions.h.

References bpp::PhyloNodeException::nodeId_.

◆ operator=()

PhyloNodePException& bpp::PhyloNodePException::operator= ( const PhyloNodePException nex)
inline

Definition at line 91 of file PhyloTreeExceptions.h.

References node_.

Member Data Documentation

◆ node_

const PhyloNode* bpp::PhyloNodePException::node_
private

Definition at line 60 of file PhyloTreeExceptions.h.

Referenced by getNode(), and operator=().

◆ nodeId_

uint bpp::PhyloNodeException::nodeId_
protectedinherited

Definition at line 29 of file PhyloTreeExceptions.h.

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


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