bpp-phyl  2.2.0
bpp::PropertyNotFoundException Class Reference

General exception thrown if a property could not be found. More...

#include <Bpp/Phyl/TreeExceptions.h>

+ Inheritance diagram for bpp::PropertyNotFoundException:
+ Collaboration diagram for bpp::PropertyNotFoundException:

Public Member Functions

 PropertyNotFoundException (const std::string &text, const std::string &propertyName, const Node *node=0)
 Build a new PropertyNotFoundException. More...
 
 PropertyNotFoundException (const std::string &text, const std::string &propertyName, int nodeId)
 Build a new PropertyNotFoundException. More...
 
virtual ~PropertyNotFoundException () throw ()
 
virtual const std::string & getPropertyName () const
 Get the name of the property that could not be found. More...
 
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

std::string propertyName_
 

Detailed Description

General exception thrown if a property could not be found.

Definition at line 142 of file TreeExceptions.h.

Constructor & Destructor Documentation

◆ PropertyNotFoundException() [1/2]

bpp::PropertyNotFoundException::PropertyNotFoundException ( const std::string &  text,
const std::string &  propertyName,
const Node node = 0 
)
inline

Build a new PropertyNotFoundException.

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

Definition at line 156 of file TreeExceptions.h.

◆ PropertyNotFoundException() [2/2]

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

Build a new PropertyNotFoundException.

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

Definition at line 167 of file TreeExceptions.h.

◆ ~PropertyNotFoundException()

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

Definition at line 171 of file TreeExceptions.h.

Member Function Documentation

◆ getNode()

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

Get the node that threw the exception.

Returns
A pointer toward the faulty node.

Definition at line 130 of file TreeExceptions.h.

References bpp::NodePException::node_.

◆ getNodeId()

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

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

◆ getPropertyName()

virtual const std::string& bpp::PropertyNotFoundException::getPropertyName ( ) const
inlinevirtual

Get the name of the property that could not be found.

Returns
The name of the missing property.

Definition at line 179 of file TreeExceptions.h.

References propertyName_.

Member Data Documentation

◆ nodeId_

int bpp::NodeException::nodeId_
protectedinherited

◆ propertyName_

std::string bpp::PropertyNotFoundException::propertyName_
private

Definition at line 146 of file TreeExceptions.h.

Referenced by getPropertyName().


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