bpp-phyl3  3.0.0
bpp::UnrootedPhyloTreeException Class Reference

Exception thrown when a tree is expected to be rooted. More...

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

+ Inheritance diagram for bpp::UnrootedPhyloTreeException:
+ Collaboration diagram for bpp::UnrootedPhyloTreeException:

Public Member Functions

 UnrootedPhyloTreeException (const std::string &text, const PhyloTree *tree=0)
 Build a new UnrootedPhyloTreeException. More...
 
virtual ~UnrootedPhyloTreeException ()
 
virtual const PhyloTreegetTree () const
 Get the tree that threw the exception. More...
 
const char * what () const noexcept override
 
const std::string & message () const noexcept
 

Private Attributes

const PhyloTreetree_
 
std::string message_
 

Detailed Description

Exception thrown when a tree is expected to be rooted.

Definition at line 434 of file PhyloTreeExceptions.h.

Constructor & Destructor Documentation

◆ UnrootedPhyloTreeException()

UnrootedPhyloTreeException::UnrootedPhyloTreeException ( const std::string &  text,
const PhyloTree tree = 0 
)

Build a new UnrootedPhyloTreeException.

Parameters
textA message to be passed to the exception hierarchy.
treeA const pointer toward the tree that threw the exception.

Definition at line 69 of file PhyloTreeExceptions.cpp.

◆ ~UnrootedPhyloTreeException()

virtual bpp::UnrootedPhyloTreeException::~UnrootedPhyloTreeException ( )
inlinevirtual

Definition at line 446 of file PhyloTreeExceptions.h.

Member Function Documentation

◆ getTree()

virtual const PhyloTree* bpp::PhyloTreeException::getTree ( ) const
inlinevirtualinherited

Get the tree that threw the exception.

Returns
The faulty tree

Definition at line 428 of file PhyloTreeExceptions.h.

References bpp::PhyloTreeException::tree_.

Member Data Documentation

◆ tree_

const PhyloTree* bpp::PhyloTreeException::tree_
privateinherited

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