mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-04 18:22:57 +02:00
util: Move ResolveErrMsg to util/error
This commit is contained in:
@@ -36,12 +36,17 @@ std::string TransactionErrorString(const TransactionError err)
|
||||
assert(false);
|
||||
}
|
||||
|
||||
std::string ResolveErrMsg(const std::string& optname, const std::string& strBind)
|
||||
{
|
||||
return strprintf(_("Cannot resolve -%s address: '%s'").translated, optname, strBind);
|
||||
}
|
||||
|
||||
std::string AmountHighWarn(const std::string& optname)
|
||||
{
|
||||
return strprintf(_("%s is set very high!").translated, optname);
|
||||
}
|
||||
|
||||
std::string AmountErrMsg(const char* const optname, const std::string& strValue)
|
||||
std::string AmountErrMsg(const std::string& optname, const std::string& strValue)
|
||||
{
|
||||
return strprintf(_("Invalid amount for -%s=<amount>: '%s'").translated, optname, strValue);
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* string functions. Types and functions defined here should not require any
|
||||
* outside dependencies.
|
||||
*
|
||||
* Error types defined here can be used in different parts of the bitcoin
|
||||
* Error types defined here can be used in different parts of the
|
||||
* codebase, to avoid the need to write boilerplate code catching and
|
||||
* translating errors passed across wallet/node/rpc/gui code boundaries.
|
||||
*/
|
||||
@@ -32,8 +32,10 @@ enum class TransactionError {
|
||||
|
||||
std::string TransactionErrorString(const TransactionError error);
|
||||
|
||||
std::string ResolveErrMsg(const std::string& optname, const std::string& strBind);
|
||||
|
||||
std::string AmountHighWarn(const std::string& optname);
|
||||
|
||||
std::string AmountErrMsg(const char* const optname, const std::string& strValue);
|
||||
std::string AmountErrMsg(const std::string& optname, const std::string& strValue);
|
||||
|
||||
#endif // BITCOIN_UTIL_ERROR_H
|
||||
|
||||
Reference in New Issue
Block a user