bpp-phyl3  3.0.0
bpp::PhyloNodePropertyNotFoundException Class Reference

General exception thrown if a property could not be found. More...

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

+ Inheritance diagram for bpp::PhyloNodePropertyNotFoundException:
+ Collaboration diagram for bpp::PhyloNodePropertyNotFoundException:

Public Member Functions

 PhyloNodePropertyNotFoundException (const std::string &text, const std::string &propertyName, const PhyloTree &tree, const std::shared_ptr< PhyloNode > node)
 Build a new PropertyNotFoundException (Node). More...
 
 PhyloNodePropertyNotFoundException (const std::string &text, const std::string &propertyName, const PhyloNode *node)
 Build a new PropertyNotFoundException (Node). More...
 
 PhyloNodePropertyNotFoundException (const std::string &text, const std::string &propertyName, uint nodeId)
 Build a new PropertyNotFoundException. More...
 
virtual ~PhyloNodePropertyNotFoundException ()
 
virtual const std::string & getPropertyName () const
 Get the name of the property that could not be found. More...
 
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

std::string propertyName_
 
const PhyloNodenode_
 
std::string message_
 

Detailed Description

General exception thrown if a property could not be found.

Definition at line 118 of file PhyloTreeExceptions.h.

Constructor & Destructor Documentation

◆ PhyloNodePropertyNotFoundException() [1/3]

bpp::PhyloNodePropertyNotFoundException::PhyloNodePropertyNotFoundException ( const std::string &  text,
const std::string &  propertyName,
const PhyloTree tree,
const std::shared_ptr< PhyloNode node 
)
inline

Build a new PropertyNotFoundException (Node).

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

Definition at line 132 of file PhyloTreeExceptions.h.

◆ PhyloNodePropertyNotFoundException() [2/3]

bpp::PhyloNodePropertyNotFoundException::PhyloNodePropertyNotFoundException ( const std::string &  text,
const std::string &  propertyName,
const PhyloNode node 
)
inline

Build a new PropertyNotFoundException (Node).

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

Definition at line 142 of file PhyloTreeExceptions.h.

◆ PhyloNodePropertyNotFoundException() [3/3]

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

Build a new PropertyNotFoundException.

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

Definition at line 153 of file PhyloTreeExceptions.h.

◆ ~PhyloNodePropertyNotFoundException()

virtual bpp::PhyloNodePropertyNotFoundException::~PhyloNodePropertyNotFoundException ( )
inlinevirtual

Definition at line 157 of file PhyloTreeExceptions.h.

Member Function Documentation

◆ getNode()

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

Get the node that threw the exception.

Returns
A pointer toward the faulty node.

Definition at line 106 of file PhyloTreeExceptions.h.

References bpp::PhyloNodePException::node_.

◆ getNodeId()

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

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_.

◆ getPropertyName()

virtual const std::string& bpp::PhyloNodePropertyNotFoundException::getPropertyName ( ) const
inlinevirtual

Get the name of the property that could not be found.

Returns
The name of the missing property.

Definition at line 165 of file PhyloTreeExceptions.h.

References propertyName_.

Member Data Documentation

◆ node_

const PhyloNode* bpp::PhyloNodePException::node_
privateinherited

◆ nodeId_

uint bpp::PhyloNodeException::nodeId_
protectedinherited

◆ propertyName_

std::string bpp::PhyloNodePropertyNotFoundException::propertyName_
private

Definition at line 122 of file PhyloTreeExceptions.h.

Referenced by getPropertyName().


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