#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() {
case CONFIGFILE_NOACCESS : ret = tr("Blast configuration file cannot be read"); break;
case PROJECTFILE_CORRUPTED : ret = tr("Project file is corrupted"); break;
case PROJECTFILE_NOACCESS : ret = tr("Project file cannot be read"); break;
+ case PROJECTPATH_NOACCESS : ret = tr("Project (sub)directory or file cannot be created or accessed"); break;
case BLOCKPATH_NOACCESS : ret = tr("Directory containing references cannot be accessed (no rights/existence)"); break;
case IMPLPATH_NOACCESS : ret = tr("Directory containing implementations cannot be accessed (no rights/existence)"); break;
case BLOCKFILE_CORRUPTED : ret = tr("Block file is corrupted"); break;
case VHDLFILE_NOACCESS : ret = tr("VHDL file cannot be read"); break;
case VHDLFILE_CORRUPTED : ret = tr("VHDL file is corrupted"); break;
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_INVALID_TYPE : ret = tr("an interface is used for an unauthorized operation according its 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 IFACE_INVALID_CLKFREQ : ret = tr("Cannot determine the frequency of the clock that synchronizes an interface."); 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;
case INVALID_VALUE : ret = tr("parameter value is not correct (e.g. not numeric, invalid other parameter name, ...)."); break;
- case INVALID_REFBLOCK_USE : ret = tr("a reference block is used during pattern computations"); break;
+ case INVALID_FUNBLOCK_USE : ret = tr("a functional block is used for an unauthorized operation while analyzing the design"); break;
+ case INVALID_REFBLOCK_USE : ret = tr("a reference block is used for an unauthorized operation while analyzing the design"); break;
+ case INVALID_GROUPBLOCK_USE : ret = tr("a group block is used for an unauthorized operation while analyzing the design"); break;
case INVALID_DELTA_CP : ret = tr("delta and CP are not consistent"); break;
case EVAL_PARAM_UNKNOWN : ret = tr("a variable used in an expression is not defined as a block parameter"); break;
case EVAL_PARAM_NOVALUE : ret = tr("can't get the double value of a block parameter"); break;
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;