40 #ifndef _TREEEXCEPTIONS_H_ 41 #define _TREEEXCEPTIONS_H_ 43 #include <Bpp/Exceptions.h> 44 #include <Bpp/Text/TextTools.h> 70 Exception(
"NodeException: " + text +
"(id:" + TextTools::toString(nodeId) +
")"),
117 NodeException::operator=(nex);
157 NodePException(
"Property not found: " + propertyName +
". " + text, node),
168 NodePException(
"Property not found: " + propertyName +
". " + text, nodeId),
244 Exception::operator=(tex);
280 #endif // _TREEEXCEPTIONS_H_ NodePException(const std::string &text, int nodeId)
Build a new NodePException.
NodePException(const NodePException &nex)
PropertyNotFoundException(const std::string &text, const std::string &propertyName, int nodeId)
Build a new PropertyNotFoundException.
virtual const std::string & getPropertyName() const
Get the name of the property that could not be found.
virtual ~NodeNotFoundException()
Interface for phylogenetic tree objects.
std::string propertyName_
virtual int getNodeId() const
Get the id of node that threw the exception.
virtual ~PropertyNotFoundException()
virtual ~NodePException()
virtual const Tree * getTree() const
Get the tree that threw the exception.
Exception thrown when something is wrong with a particular node.
TreeException & operator=(const TreeException &tex)
General exception thrown when something wrong happened in a tree.
UnrootedTreeException(const std::string &text, const Tree *tree=0)
Build a new UnrootedTreeException.
The phylogenetic node class.
virtual std::string getId() const
Get the node id that threw the exception.
NodeException(const std::string &text, int nodeId)
Build a new NodePException.
General exception thrown if a property could not be found.
NodeNotFoundException(const std::string &text, const std::string &id)
Build a new NodeNotFoundException.
NodePException & operator=(const NodePException &nex)
Exception thrown when a tree is expected to be rooted.
TreeException(const TreeException &tex)
virtual const Node * getNode() const
Get the node that threw the exception.
PropertyNotFoundException(const std::string &text, const std::string &propertyName, const Node *node=0)
Build a new PropertyNotFoundException.
virtual int getNodeId() const
Get the id of node that threw the exception.
General exception thrown when something is wrong with a particular node.
TreeException(const std::string &text, const Tree *tree=0)
Build a new TreeException.
General exception thrown when something is wrong with a particular node.
NodePException(const std::string &text, const Node *node=0)
Build a new NodePException.
virtual ~UnrootedTreeException()