<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hi,<br><br>I have been analyzing the code of <i>mymoneyfile.cpp</i> and I was wondering how some of the exceptions handlers could be accessed. <br><br>The first one is the exception handler in "QString MyMoneyFile::storageId(void)". "testStorageId" in <i>mymoneyfiletest.cpp</i> is devoted to this method, but the exception is not thrown in it.<br><br>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):<br><br> <font style="font-size: 8pt;" size="1"> try {</font><font style="font-size: 8pt;" size="1"><br></font><font style="font-size: 8pt;" size="1">    return openingBalanceAccount_internal(security);</font><font style="font-size: 8pt;" size="1"><br></font><font style="font-size: 8pt;" size="1">  } catch (MyMoneyException *e) {</font><font style="font-size: 8pt;" size="1"><br></font><font style="font-size: 8pt;" size="1">    delete e;</font><font style="font-size: 8pt;" size="1"><br></font><font style="font-size: 8pt;" size="1">    MyMoneyFileTransaction ft;</font><font style="font-size: 8pt;" size="1"><br></font><font style="font-size: 8pt;" size="1">    MyMoneyAccount acc;</font><font style="font-size: 8pt;" size="1"><br></font><font style="font-size: 8pt;" size="1"><br></font><font style="font-size: 8pt;" size="1">    try {</font><font style="font-size: 8pt;" size="1"><br></font><font style="font-size: 8pt;" size="1">      acc = createOpeningBalanceAccount(security);</font><font style="font-size: 8pt;" size="1"><br></font><font style="font-size: 8pt;" size="1">      ft.commit();</font><font style="font-size: 8pt;" size="1"><br></font><font style="font-size: 8pt;" size="1"><br></font><font style="font-size: 8pt;" size="1">    </font><font style="font-size: 8pt;" size="1"><b>} catch (MyMoneyException* e) {<br>      qDebug("Unable to create opening balance account for security %s", qPrintable(security.id()));<br>      delete e;<br>    }</b></font><font style="font-size: 8pt;" size="1"><br></font><font style="font-size: 8pt;" size="1">    return acc;</font><font style="font-size: 8pt;" size="1"><br></font><font style="font-size: 8pt;" size="1">  }</font><br><br>Does anybody know which those try-catch blocks were implemented?<br><br>Thanks in advance.<br>                                      </div></body>
</html>