Changeset View
Changeset View
Standalone View
Standalone View
kmymoney/converter/mymoneystatementreader.cpp
Context not available. | |||||
531 | qDebug("Processing transactions done (%s)", qPrintable(d->m_account.name())); | 531 | qDebug("Processing transactions done (%s)", qPrintable(d->m_account.name())); | ||
---|---|---|---|---|---|
532 | 532 | | |||
533 | } catch (const MyMoneyException &e) { | 533 | } catch (const MyMoneyException &e) { | ||
534 | if (e.what() == "USERABORT") | 534 | if (QString::fromLatin1(e.what()).contains("USERABORT")) | ||
535 | m_userAbort = true; | 535 | m_userAbort = true; | ||
536 | else | 536 | else | ||
537 | qDebug("Caught exception from processTransactionEntry() not caused by USERABORT: %s", qPrintable(e.what())); | 537 | qDebug("Caught exception from processTransactionEntry() not caused by USERABORT: %s", qPrintable(e.what())); | ||
Context not available. | |||||
547 | signalProgress(0, s.m_listPrices.count(), "Importing Statement ..."); | 547 | signalProgress(0, s.m_listPrices.count(), "Importing Statement ..."); | ||
548 | KMyMoneyUtils::processPriceList(s); | 548 | KMyMoneyUtils::processPriceList(s); | ||
549 | } catch (const MyMoneyException &e) { | 549 | } catch (const MyMoneyException &e) { | ||
550 | if (e.what() == "USERABORT") | 550 | if (QString::fromLatin1(e.what()).contains("USERABORT")) | ||
551 | m_userAbort = true; | 551 | m_userAbort = true; | ||
552 | else | 552 | else | ||
553 | qDebug("Caught exception from processPriceEntry() not caused by USERABORT: %s", qPrintable(e.what())); | 553 | qDebug("Caught exception from processPriceEntry() not caused by USERABORT: %s", qPrintable(e.what())); | ||
Context not available. | |||||
998 | 998 | | |||
999 | // if we did not find a matching payee, we throw an exception and try to create it | 999 | // if we did not find a matching payee, we throw an exception and try to create it | ||
1000 | if (payeeid.isEmpty()) | 1000 | if (payeeid.isEmpty()) | ||
1001 | throw MYMONEYEXCEPTION("payee not matched"); | 1001 | throw MYMONEYEXCEPTION_CSTRING("payee not matched"); | ||
1002 | 1002 | | |||
1003 | s1.setPayeeId(payeeid); | 1003 | s1.setPayeeId(payeeid); | ||
1004 | } catch (const MyMoneyException &) { | 1004 | } catch (const MyMoneyException &) { | ||
Context not available. | |||||
1085 | payee.setDefaultAccountId(accountId); | 1085 | payee.setDefaultAccountId(accountId); | ||
1086 | } else if (result != QDialog::Rejected) { | 1086 | } else if (result != QDialog::Rejected) { | ||
1087 | //add cancel button? and throw exception like below | 1087 | //add cancel button? and throw exception like below | ||
1088 | throw MYMONEYEXCEPTION("USERABORT"); | 1088 | throw MYMONEYEXCEPTION_CSTRING("USERABORT"); | ||
1089 | } | 1089 | } | ||
1090 | } | 1090 | } | ||
1091 | 1091 | | |||
Context not available. | |||||
1097 | s1.setPayeeId(payeeid); | 1097 | s1.setPayeeId(payeeid); | ||
1098 | 1098 | | |||
1099 | } catch (const MyMoneyException &e) { | 1099 | } catch (const MyMoneyException &e) { | ||
1100 | KMessageBox::detailedSorry(0, i18n("Unable to add payee/receiver"), | 1100 | KMessageBox::detailedSorry(nullptr, i18n("Unable to add payee/receiver"), e.what()); | ||
1101 | i18n("%1 thrown in %2:%3", e.what(), e.file(), e.line())); | | |||
1102 | 1101 | | |||
1103 | } | 1102 | } | ||
1104 | 1103 | | |||
Context not available. | |||||
1106 | s1.setPayeeId(QString()); | 1105 | s1.setPayeeId(QString()); | ||
1107 | 1106 | | |||
1108 | } else { | 1107 | } else { | ||
1109 | throw MYMONEYEXCEPTION("USERABORT"); | 1108 | throw MYMONEYEXCEPTION_CSTRING("USERABORT"); | ||
1110 | 1109 | | |||
1111 | } | 1110 | } | ||
1112 | } | 1111 | } | ||
Context not available. | |||||
1300 | 1299 | | |||
1301 | int result = KMessageBox::warningContinueCancel(0, message); | 1300 | int result = KMessageBox::warningContinueCancel(0, message); | ||
1302 | if (result == KMessageBox::Cancel) | 1301 | if (result == KMessageBox::Cancel) | ||
1303 | throw MYMONEYEXCEPTION("USERABORT"); | 1302 | throw MYMONEYEXCEPTION_CSTRING("USERABORT"); | ||
1304 | } | 1303 | } | ||
1305 | } | 1304 | } | ||
1306 | 1305 | | |||
Context not available. | |||||
1412 | } | 1411 | } | ||
1413 | } else { | 1412 | } else { | ||
1414 | if (accountSelect->aborted()) | 1413 | if (accountSelect->aborted()) | ||
1415 | //throw MYMONEYEXCEPTION("USERABORT"); | 1414 | //throw MYMONEYEXCEPTION_CSTRING("USERABORT"); | ||
1416 | done = true; | 1415 | done = true; | ||
1417 | else | 1416 | else | ||
1418 | KMessageBox::error(0, QLatin1String("<html>") + i18n("You must select an account, create a new one, or press the <b>Abort</b> button.") + QLatin1String("</html>")); | 1417 | KMessageBox::error(0, QLatin1String("<html>") + i18n("You must select an account, create a new one, or press the <b>Abort</b> button.") + QLatin1String("</html>")); | ||
Context not available. | |||||
1519 | matcher.match(torig, matchedSplit, importedTransaction, importedSplit); | 1518 | matcher.match(torig, matchedSplit, importedTransaction, importedSplit); | ||
1520 | d->transactionsMatched++; | 1519 | d->transactionsMatched++; | ||
1521 | 1520 | | |||
1522 | } catch (const MyMoneyException &e) { | 1521 | } catch (const MyMoneyException &) { | ||
1523 | // make sure we get rid of the editor before | 1522 | // make sure we get rid of the editor before | ||
1524 | // the KEnterScheduleDlg is destroyed | 1523 | // the KEnterScheduleDlg is destroyed | ||
1525 | delete editor; | 1524 | delete editor; | ||
1526 | throw e; // rethrow | 1525 | throw; // rethrow | ||
1527 | } | 1526 | } | ||
1528 | } | 1527 | } | ||
1529 | // delete the editor | 1528 | // delete the editor | ||
Context not available. |