X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/fc9f5b8b77edda9e49a35d8ef75c4d71caf1c832..e9f53048b4a0192d95382277e8f40e850998b256:/Exception.cpp?ds=sidebyside diff --git a/Exception.cpp b/Exception.cpp index 4036dac..8c59d0d 100644 --- a/Exception.cpp +++ b/Exception.cpp @@ -1,14 +1,16 @@ #include "Exception.h" -Exception::Exception(int _id) { +Exception::Exception(int _id, void *_source) { id = _id; message = getDefaultMessage(); + source = _source; } Exception::Exception(const Exception& other) { id = other.id; message = other.message; + source = other.source; } QString Exception::getDefaultMessage() { @@ -32,6 +34,9 @@ QString Exception::getDefaultMessage() { case IFACE_NULL : ret = tr("A parameter of type AbstractInterface* has been provided with NULL value."); break; case IFACE_INVALID_TYPE : ret = tr("A parameter of type AbstractInterface* is used with an incorrect instance type."); break; case IFACE_MULTIPLICITY_REACHED : ret = tr("Impossible to create another instance of a GraphInterface: the maximum multiplicity is reached."); break; + case IFACE_BLOCK_NOCLKRST : ret = tr("Cannot find a clk or rst for a block."); break; + case IFACE_GROUP_NOCLKRST : ret = tr("Cannot find a clk or rst for a group."); break; + case IFACE_TOP_NOCLKRSTGEN : ret = tr("Cannot find the clkrstgen block in top group."); break; case BLOCKITEM_NULL : ret = tr("A parameter of type AbstractBlockItem* has been provided with NULL value."); break; case BLOCKITEM_INVALID_TYPE : ret = tr("A parameter of type AbstractBlockItem* is used with an incorrect instance type."); break; case WIDTHS_NOT_EQUALS : ret = tr("Two interfaces are connected but don't have the same widths."); break; @@ -51,6 +56,7 @@ QString Exception::getDefaultMessage() { case IP_AP_NOTCOMPAT : ret = tr("IP and AP not compatible"); break; case IP_END_NULLCOL : ret = tr("IP ends with anull column (normally not possible during compat. check)"); break; case AP_TOO_SHORT : ret = tr("AP has been badly computed, leading to a AP shorter than needed (NB: it is an abnormal case)"); break; + case IFACE_NOT_CONNECTED : ret = tr("an interface with control is not coonected, leading to an impossible graph analysis"); break; } return ret;