aboutsummaryrefslogtreecommitdiff
path: root/src/util/error.h
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2019-08-20 11:00:43 -0400
committerMarcoFalke <falke.marco@gmail.com>2019-08-28 15:52:26 -0400
commitfa70d199d0c2182d76b2a1cfa21f9ada4bb12913 (patch)
treedcba5d6fa73dde5f736ecaa85bf0daf6d51053a7 /src/util/error.h
parent119e97ae2d805fc29ef3744fff401ef289a19f8e (diff)
downloadbitcoin-fa70d199d0c2182d76b2a1cfa21f9ada4bb12913.tar.xz
util: Make util/error bilingual_str (refactor)
Translated strings should not end up in the debug log, stderr, or returned by an RPC. Changing the util methods in util/error to return a bilingual_str paves the way to achieve this goal in the long term.
Diffstat (limited to 'src/util/error.h')
-rw-r--r--src/util/error.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/util/error.h b/src/util/error.h
index 7777cc0c5d..f540b0020d 100644
--- a/src/util/error.h
+++ b/src/util/error.h
@@ -17,6 +17,8 @@
#include <string>
+struct bilingual_str;
+
enum class TransactionError {
OK, //!< No error
MISSING_INPUTS,
@@ -34,8 +36,8 @@ std::string TransactionErrorString(const TransactionError error);
std::string ResolveErrMsg(const std::string& optname, const std::string& strBind);
-std::string AmountHighWarn(const std::string& optname);
+bilingual_str AmountHighWarn(const std::string& optname);
-std::string AmountErrMsg(const std::string& optname, const std::string& strValue);
+bilingual_str AmountErrMsg(const std::string& optname, const std::string& strValue);
#endif // BITCOIN_UTIL_ERROR_H