refactor: Error message bilingual_str consistency

- Move the decision whether to translate an error message to where it is
  defined. This simplifies call sites: no more `InitError(Untranslated(...))`.

- Make all functions in `util/error.h` consistently return a
  `bilingual_str`. We've decided to use this as error message type so
  let's roll with it.

This has no functional changes: no messages are changed, no new
translation messages are defined.
This commit is contained in:
Wladimir J. van der Laan
2020-06-05 14:26:16 +02:00
parent a79bca2f1f
commit 77b79fa6ef
10 changed files with 47 additions and 41 deletions

View File

@@ -2997,7 +2997,7 @@ bool CWallet::CreateTransaction(const std::vector<CRecipient>& vecSend, CTransac
}
if (nFeeRet > m_default_max_tx_fee) {
error = Untranslated(TransactionErrorString(TransactionError::MAX_FEE_EXCEEDED));
error = TransactionErrorString(TransactionError::MAX_FEE_EXCEEDED);
return false;
}