3 Exception::Exception(int _id) {
5 message = getDefaultMessage();
9 Exception::Exception(const Exception& other) {
11 message = other.message;
14 QString Exception::getDefaultMessage() {
17 case CONFIGFILE_CORRUPTED : ret = tr("Blast configuration file is corrupted"); break;
18 case CONFIGFILE_NOACCESS : ret = tr("Blast configuration file cannot be read"); break;
19 case PROJECTFILE_CORRUPTED : ret = tr("Project file is corrupted"); break;
20 case PROJECTFILE_NOACCESS : ret = tr("Project file cannot be read"); break;
21 case BLOCKPATH_NOACCESS : ret = tr("Directory containing references cannot be accessed (no rights/existence)"); break;
22 case IMPLPATH_NOACCESS : ret = tr("Directory containing implementations cannot be accessed (no rights/existence)"); break;
23 case BLOCKFILE_CORRUPTED : ret = tr("Block file is corrupted"); break;
24 case BLOCKFILE_NOACCESS : ret = tr("Block file cannot be read"); break;
25 case IMPLFILE_CORRUPTED : ret = tr("Implementation file is corrupted"); break;
26 case IMPLFILE_NOACCESS : ret = tr("Implementation file cannot be read"); break;
27 case IMPLFILE_NOPATTERN : ret = tr("Implementation file does not contains pattern definitions"); break;
28 case BLOCK_NULL : ret = tr("A parameter of type AbstractBlock* has been provided with NULL value."); break;
29 case BLOCK_INVALID_TYPE : ret = tr("A parameter of type AbstractBlock* is used with an incorrect instance type."); break;
30 case VHDLFILE_NOACCESS : ret = tr("VHDL file cannot be read"); break;
31 case VHDLFILE_CORRUPTED : ret = tr("VHDL file is corrupted"); break;
32 case IFACE_NULL : ret = tr("A parameter of type AbstractInterface* has been provided with NULL value."); break;
33 case IFACE_INVALID_TYPE : ret = tr("A parameter of type AbstractInterface* is used with an incorrect instance type."); break;
34 case IFACE_MULTIPLICITY_REACHED : ret = tr("Impossible to create another instance of a GraphInterface: the maximum multiplicity is reached."); break;
35 case BLOCKITEM_NULL : ret = tr("A parameter of type AbstractBlockItem* has been provided with NULL value."); break;
36 case BLOCKITEM_INVALID_TYPE : ret = tr("A parameter of type AbstractBlockItem* is used with an incorrect instance type."); break;
37 case WIDTHS_NOT_EQUALS : ret = tr("Two interfaces are connected but don't have the same widths."); break;
38 case INVALID_VALUE : ret = tr("parameter value is not correct (e.g. not numeric, invalid other parameter name, ...)."); break;
39 case INVALID_REFBLOCK_USE : ret = tr("a reference block is used during pattern computations"); break;
40 case INVALID_DELTA_CP : ret = tr("delta and CP are not consistent"); break;
41 case EVAL_PARAM_UNKNOWN : ret = tr("a variable used in an expression is not defined as a block parameter"); break;
42 case EVAL_PARAM_NOVALUE : ret = tr("can't get the double value of a block parameter"); break;
43 case EVAL_INVALID_EXPR : ret = tr("invalid arithmetic expression (in a block parameter/pattern)"); break;
44 case INVALID_IFACE_PATTERN : ret = tr("the pattern of an interface is invalid (not correct grammar)"); break;
45 case INVALID_IFACE_PC : ret = tr("the production counter of an interface is invalid (not correct grammar)"); break;
46 case INVALID_IFACE_CP_LENGTH : ret = tr("the size of CP for an interface differs from others"); break;
47 case NO_IFACE_CP : ret = tr("an interface has no CP defined in reference block"); break;
48 case INVALID_IFACE_PP_LENGTH : ret = tr("the size of PP for an interface differs from others"); break;
49 case NO_IFACE_PP : ret = tr("an interface has no PP defined in reference block"); break;
50 case NO_IFACE_IP : ret = tr("an interface has no IP"); break;
51 case IP_AP_NOTCOMPAT : ret = tr("IP and AP not compatible"); break;
52 case IP_END_NULLCOL : ret = tr("IP ends with anull column (normally not possible during compat. check)"); break;
53 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;