Hi, I have been analyzing the code of mymoneyfile.cpp and I was wondering how some of the exceptions handlers could be accessed.
The first one is the exception handler in "QString MyMoneyFile::storageId(void)". "testStorageId" in mymoneyfiletest.cpp is devoted to this method, but the exception is not thrown in it. The second one is in "const MyMoneyAccount MyMoneyFile::openingBalanceAccount(const MyMoneySecurity& s). The first "catch" is accessed twice in "testOpeningBalance", but the second nested catch is not. I cannot think of a situation that allows me to access this handler (in bold): try { return openingBalanceAccount_internal(security); } catch (MyMoneyException *e) { delete e; MyMoneyFileTransaction ft; MyMoneyAccount acc; try { acc = createOpeningBalanceAccount(security); ft.commit(); } catch (MyMoneyException* e) { qDebug("Unable to create opening balance account for security %s", qPrintable(security.id())); delete e; } return acc; } Does anybody know which those try-catch blocks were implemented? Thanks in advance.
_______________________________________________ KMyMoney-devel mailing list KMyMoney-devel@kde.org https://mail.kde.org/mailman/listinfo/kmymoney-devel