bpp-phyl3  3.0.0
bpp::TreeException Class Reference

General exception thrown when something wrong happened in a tree. More...

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

+ Inheritance diagram for bpp::TreeException:
+ Collaboration diagram for bpp::TreeException:

Public Member Functions

 TreeException (const std::string &text, const Tree *tree=0)
 Build a new TreeException. More...
 
 TreeException (const TreeException &tex)
 
TreeExceptionoperator= (const TreeException &tex)
 
virtual ~TreeException ()
 
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

General exception thrown when something wrong happened in a tree.

Definition at line 188 of file TreeExceptions.h.

Constructor & Destructor Documentation

◆ TreeException() [1/2]

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

Build a new TreeException.

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

Definition at line 31 of file TreeExceptions.cpp.

◆ TreeException() [2/2]

bpp::TreeException::TreeException ( const TreeException tex)
inline

Definition at line 203 of file TreeExceptions.h.

◆ ~TreeException()

virtual bpp::TreeException::~TreeException ( )
inlinevirtual

Definition at line 215 of file TreeExceptions.h.

Member Function Documentation

◆ getTree()

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

Get the tree that threw the exception.

Returns
The faulty tree

Definition at line 223 of file TreeExceptions.h.

References tree_.

◆ operator=()

TreeException& bpp::TreeException::operator= ( const TreeException tex)
inline

Definition at line 208 of file TreeExceptions.h.

References tree_.

Member Data Documentation

◆ tree_

const Tree* bpp::TreeException::tree_
private

Definition at line 192 of file TreeExceptions.h.

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


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