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 BLOCK_NULL : ret = tr("A parameter of type AbstractBlock* has been provided with NULL value."); break;
28 case BLOCK_INVALID_TYPE : ret = tr("A parameter of type AbstractBlock* is used with an incorrect instance type."); break;
29 case IFACE_NULL : ret = tr("A parameter of type AbstractInterface* has been provided with NULL value."); break;
30 case IFACE_INVALID_TYPE : ret = tr("A parameter of type AbstractInterface* is used with an incorrect instance type."); break;
31 case IFACE_MULTIPLICITY_REACHED : ret = tr("Impossible to create another instance of a GraphInterface: the maximum multiplicity is reached."); break;
32 case BLOCKITEM_NULL : ret = tr("A parameter of type AbstractBlockItem* has been provided with NULL value."); break;
33 case BLOCKITEM_INVALID_TYPE : ret = tr("A parameter of type AbstractBlockItem* is used with an incorrect instance type."); break;
34 case WIDTHS_NOT_EQUALS : ret = tr("Two interfaces are connected but don't have the same widths."); break;
35 case INVALID_VALUE : ret = tr("parameter value is not correct (e.g. not numeric, invalid other parameter name, ...)."); break;