bpp-phyl3  3.0.0
bpp::PhyloBranchPException Class Reference

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

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

+ Inheritance diagram for bpp::PhyloBranchPException:
+ Collaboration diagram for bpp::PhyloBranchPException:

Public Member Functions

 PhyloBranchPException (const std::string &text, const PhyloTree &tree, const std::shared_ptr< PhyloBranch > branch)
 Build a new PhyloBranchPException. More...
 
 PhyloBranchPException (const std::string &text, const PhyloBranch *branch)
 Build a new PhyloBranchPException. More...
 
 PhyloBranchPException (const std::string &text, uint branchId)
 Build a new PhyloBranchPException. More...
 
 PhyloBranchPException (const PhyloBranchPException &nex)
 
PhyloBranchPExceptionoperator= (const PhyloBranchPException &nex)
 
virtual ~PhyloBranchPException ()
 
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

const PhyloBranchbranch_
 
std::string message_
 

Detailed Description

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

Definition at line 239 of file PhyloTreeExceptions.h.

Constructor & Destructor Documentation

◆ PhyloBranchPException() [1/4]

PhyloBranchPException::PhyloBranchPException ( const std::string &  text,
const PhyloTree tree,
const std::shared_ptr< PhyloBranch branch 
)

Build a new PhyloBranchPException.

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

Definition at line 39 of file PhyloTreeExceptions.cpp.

◆ PhyloBranchPException() [2/4]

PhyloBranchPException::PhyloBranchPException ( const std::string &  text,
const PhyloBranch branch 
)

Build a new PhyloBranchPException.

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

Definition at line 45 of file PhyloTreeExceptions.cpp.

◆ PhyloBranchPException() [3/4]

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

Build a new PhyloBranchPException.

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

Definition at line 266 of file PhyloTreeExceptions.h.

◆ PhyloBranchPException() [4/4]

bpp::PhyloBranchPException::PhyloBranchPException ( const PhyloBranchPException nex)
inline

Definition at line 269 of file PhyloTreeExceptions.h.

◆ ~PhyloBranchPException()

virtual bpp::PhyloBranchPException::~PhyloBranchPException ( )
inlinevirtual

Definition at line 281 of file PhyloTreeExceptions.h.

Member Function Documentation

◆ getBranch()

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

Get the branch that threw the exception.

Returns
A pointer toward the faulty branch.

Definition at line 289 of file PhyloTreeExceptions.h.

References branch_.

◆ getBranchId()

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

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

◆ operator=()

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

Definition at line 274 of file PhyloTreeExceptions.h.

References branch_.

Member Data Documentation

◆ branch_

const PhyloBranch* bpp::PhyloBranchPException::branch_
private

Definition at line 243 of file PhyloTreeExceptions.h.

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

◆ branchId_

uint bpp::PhyloBranchException::branchId_
protectedinherited

Definition at line 212 of file PhyloTreeExceptions.h.

Referenced by bpp::PhyloBranchException::getBranchId(), and getBranchId().


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