bpp-phyl3  3.0.0
bpp::UnrootedTreeException Class Reference

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

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

+ Inheritance diagram for bpp::UnrootedTreeException:
+ Collaboration diagram for bpp::UnrootedTreeException:

Public Member Functions

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

Private Attributes

const Treetree_
 
std::string message_
 

Detailed Description

Exception thrown when a tree is expected to be rooted.

Definition at line 229 of file TreeExceptions.h.

Constructor & Destructor Documentation

◆ UnrootedTreeException()

UnrootedTreeException::UnrootedTreeException ( const std::string &  text,
const Tree tree = 0 
)

Build a new UnrootedTreeException.

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

Definition at line 37 of file TreeExceptions.cpp.

◆ ~UnrootedTreeException()

virtual bpp::UnrootedTreeException::~UnrootedTreeException ( )
inlinevirtual

Definition at line 241 of file TreeExceptions.h.

Member Function Documentation

◆ getTree()

virtual const Tree* bpp::TreeException::getTree ( ) const
inlinevirtualinherited

Get the tree that threw the exception.

Returns
The faulty tree

Definition at line 223 of file TreeExceptions.h.

References bpp::TreeException::tree_.

Member Data Documentation

◆ tree_

const Tree* bpp::TreeException::tree_
privateinherited

Definition at line 192 of file TreeExceptions.h.

Referenced by bpp::TreeException::getTree(), and bpp::TreeException::operator=().


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