File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -212,7 +212,7 @@ WalletModel::SendCoinsReturn WalletModel::prepareTransaction(WalletModelTransact
212212 return AmountExceedsBalance;
213213 }
214214
215- {
215+ try {
216216 CAmount nFeeRequired = 0 ;
217217 int nChangePosRet = -1 ;
218218
@@ -240,6 +240,11 @@ WalletModel::SendCoinsReturn WalletModel::prepareTransaction(WalletModelTransact
240240 if (nFeeRequired > m_wallet->getDefaultMaxTxFee ()) {
241241 return AbsurdFee;
242242 }
243+ } catch (const std::runtime_error& err) {
244+ // Something unexpected happened, instruct user to report this bug.
245+ Q_EMIT message (tr (" Send Coins" ), QString::fromStdString (err.what ()),
246+ CClientUIInterface::MSG_ERROR);
247+ return TransactionCreationFailed;
243248 }
244249
245250 return SendCoinsReturn (OK);
You can’t perform that action at this time.
0 commit comments