bpp-phyl  2.2.0
bpp::NodePException Class Reference

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

#include <Bpp/Phyl/TreeExceptions.h>

+ Inheritance diagram for bpp::NodePException:
+ Collaboration diagram for bpp::NodePException:

Public Member Functions

 NodePException (const std::string &text, const Node *node=0)
 Build a new NodePException. More...
 
 NodePException (const std::string &text, int nodeId)
 Build a new NodePException. More...
 
 NodePException (const NodePException &nex)
 
NodePExceptionoperator= (const NodePException &nex)
 
virtual ~NodePException () throw ()
 
virtual const NodegetNode () const
 Get the node that threw the exception. More...
 
virtual int getNodeId () const
 Get the id of node that threw the exception. More...
 

Protected Attributes

int nodeId_
 

Private Attributes

const Nodenode_
 

Detailed Description

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

Definition at line 88 of file TreeExceptions.h.

Constructor & Destructor Documentation

◆ NodePException() [1/3]

NodePException::NodePException ( const std::string &  text,
const Node node = 0 
)

Build a new NodePException.

Parameters
textA message to be passed to the exception hierarchy.
nodeA const pointer toward the node that threw the exception.

Definition at line 52 of file TreeExceptions.cpp.

◆ NodePException() [2/3]

bpp::NodePException::NodePException ( const std::string &  text,
int  nodeId 
)
inline

Build a new NodePException.

Parameters
textA message to be passed to the exception hierarchy.
nodeIdThe id of the node that threw the exception.

Definition at line 107 of file TreeExceptions.h.

◆ NodePException() [3/3]

bpp::NodePException::NodePException ( const NodePException nex)
inline

Definition at line 110 of file TreeExceptions.h.

◆ ~NodePException()

virtual bpp::NodePException::~NodePException ( )
throw (
)
inlinevirtual

Definition at line 122 of file TreeExceptions.h.

Member Function Documentation

◆ getNode()

virtual const Node* bpp::NodePException::getNode ( ) const
inlinevirtual

Get the node that threw the exception.

Returns
A pointer toward the faulty node.

Definition at line 130 of file TreeExceptions.h.

References node_.

◆ getNodeId()

virtual int bpp::NodePException::getNodeId ( ) const
inlinevirtual

Get the id of node that threw the exception.

Returns
The id of the faulty node.

Reimplemented from bpp::NodeException.

Definition at line 136 of file TreeExceptions.h.

References bpp::NodeException::nodeId_.

◆ operator=()

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

Definition at line 115 of file TreeExceptions.h.

References node_.

Member Data Documentation

◆ node_

const Node* bpp::NodePException::node_
private

Definition at line 92 of file TreeExceptions.h.

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

◆ nodeId_

int bpp::NodeException::nodeId_
protectedinherited

Definition at line 61 of file TreeExceptions.h.

Referenced by bpp::NodeException::getNodeId(), and getNodeId().


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