bpp-phyl3  3.0.0
bpp::PhyloBranchPropertyNotFoundException Class Reference

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

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

+ Inheritance diagram for bpp::PhyloBranchPropertyNotFoundException:
+ Collaboration diagram for bpp::PhyloBranchPropertyNotFoundException:

Public Member Functions

 PhyloBranchPropertyNotFoundException (const std::string &text, const std::string &propertyName, const PhyloTree &tree, const std::shared_ptr< PhyloBranch > branch)
 Build a new PropertyNotFoundException (Branch). More...
 
 PhyloBranchPropertyNotFoundException (const std::string &text, const std::string &propertyName, const PhyloBranch *branch)
 Build a new PropertyNotFoundException (Branch). More...
 
 PhyloBranchPropertyNotFoundException (const std::string &text, const std::string &propertyName, uint branchId)
 Build a new PropertyNotFoundException. More...
 
virtual ~PhyloBranchPropertyNotFoundException ()
 
virtual const std::string & getPropertyName () const
 Get the name of the property that could not be found. More...
 
virtual const PhyloBranchgetBranch () const
 Get the branch that threw the exception. More...
 
virtual uint getBranchId () const
 Get the id of branch that threw the exception. More...
 
const char * what () const noexcept override
 
const std::string & message () const noexcept
 

Protected Attributes

uint branchId_
 

Private Attributes

std::string propertyName_
 
const PhyloBranchbranch_
 
std::string message_
 

Detailed Description

General exception thrown if a property could not be found.

Definition at line 301 of file PhyloTreeExceptions.h.

Constructor & Destructor Documentation

◆ PhyloBranchPropertyNotFoundException() [1/3]

bpp::PhyloBranchPropertyNotFoundException::PhyloBranchPropertyNotFoundException ( const std::string &  text,
const std::string &  propertyName,
const PhyloTree tree,
const std::shared_ptr< PhyloBranch branch 
)
inline

Build a new PropertyNotFoundException (Branch).

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

Definition at line 316 of file PhyloTreeExceptions.h.

◆ PhyloBranchPropertyNotFoundException() [2/3]

bpp::PhyloBranchPropertyNotFoundException::PhyloBranchPropertyNotFoundException ( const std::string &  text,
const std::string &  propertyName,
const PhyloBranch branch 
)
inline

Build a new PropertyNotFoundException (Branch).

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

Definition at line 327 of file PhyloTreeExceptions.h.

◆ PhyloBranchPropertyNotFoundException() [3/3]

bpp::PhyloBranchPropertyNotFoundException::PhyloBranchPropertyNotFoundException ( const std::string &  text,
const std::string &  propertyName,
uint  branchId 
)
inline

Build a new PropertyNotFoundException.

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

Definition at line 338 of file PhyloTreeExceptions.h.

◆ ~PhyloBranchPropertyNotFoundException()

virtual bpp::PhyloBranchPropertyNotFoundException::~PhyloBranchPropertyNotFoundException ( )
inlinevirtual

Definition at line 342 of file PhyloTreeExceptions.h.

Member Function Documentation

◆ getBranch()

virtual const PhyloBranch* bpp::PhyloBranchPException::getBranch ( ) const
inlinevirtualinherited

Get the branch that threw the exception.

Returns
A pointer toward the faulty branch.

Definition at line 289 of file PhyloTreeExceptions.h.

References bpp::PhyloBranchPException::branch_.

◆ getBranchId()

virtual uint bpp::PhyloBranchPException::getBranchId ( ) const
inlinevirtualinherited

Get the id of branch that threw the exception.

Returns
The id of the faulty branch.

Reimplemented from bpp::PhyloBranchException.

Definition at line 295 of file PhyloTreeExceptions.h.

References bpp::PhyloBranchException::branchId_.

◆ getPropertyName()

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

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

Returns
The name of the missing property.

Definition at line 350 of file PhyloTreeExceptions.h.

References propertyName_.

Member Data Documentation

◆ branch_

const PhyloBranch* bpp::PhyloBranchPException::branch_
privateinherited

◆ branchId_

uint bpp::PhyloBranchException::branchId_
protectedinherited

◆ propertyName_

std::string bpp::PhyloBranchPropertyNotFoundException::propertyName_
private

Definition at line 305 of file PhyloTreeExceptions.h.

Referenced by getPropertyName().


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