diff options
author | Wladimir J. van der Laan <laanwj@protonmail.com> | 2020-06-05 14:26:16 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@protonmail.com> | 2020-06-09 15:39:44 +0200 |
commit | 77b79fa6ef60d363ca720cef5473f1a2c45099a3 (patch) | |
tree | e3cc8ae26b3505c07c87a5060973deaed5e71aef /src/net_permissions.h | |
parent | a79bca2f1fb25f433d6e100a31a3acfde2656ce1 (diff) |
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.
Diffstat (limited to 'src/net_permissions.h')
-rw-r--r-- | src/net_permissions.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/net_permissions.h b/src/net_permissions.h index d35c5ee0cd..e004067e75 100644 --- a/src/net_permissions.h +++ b/src/net_permissions.h @@ -10,6 +10,8 @@ #ifndef BITCOIN_NET_PERMISSIONS_H #define BITCOIN_NET_PERMISSIONS_H +struct bilingual_str; + extern const std::vector<std::string> NET_PERMISSIONS_DOC; enum NetPermissionFlags @@ -54,14 +56,14 @@ public: class NetWhitebindPermissions : public NetPermissions { public: - static bool TryParse(const std::string str, NetWhitebindPermissions& output, std::string& error); + static bool TryParse(const std::string str, NetWhitebindPermissions& output, bilingual_str& error); CService m_service; }; class NetWhitelistPermissions : public NetPermissions { public: - static bool TryParse(const std::string str, NetWhitelistPermissions& output, std::string& error); + static bool TryParse(const std::string str, NetWhitelistPermissions& output, bilingual_str& error); CSubNet m_subnet; }; |