aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/node.cpp
diff options
context:
space:
mode:
authorMarcoFalke <[email protected]>2020-06-09 17:17:58 -0400
committerMarcoFalke <[email protected]>2020-06-09 17:18:04 -0400
commitf8364df25070cea08f0fb5bbbb212f1ff72f9d21 (patch)
tree0f0a706e0b862b583234c743dd466e07b7c1c23f /src/interfaces/node.cpp
parentMerge #19227: test: change blacklist to blocklist (diff)
parentrefactor: Change Node::initError to take bilingual_str (diff)
downloaddiscoin-f8364df25070cea08f0fb5bbbb212f1ff72f9d21.tar.xz
discoin-f8364df25070cea08f0fb5bbbb212f1ff72f9d21.zip
Merge #19176: refactor: Error message bilingual_str consistency
6fe989054f0ad9308e8a25f7123d9e5dd67f1164 refactor: Change Node::initError to take bilingual_str (Wladimir J. van der Laan) 425e7cb8cf6140e03802a96d2be9a8b4aa2e244a refactor: Put`TryParsePermissionFlags` in anonymous namespace (Wladimir J. van der Laan) 77b79fa6ef60d363ca720cef5473f1a2c45099a3 refactor: Error message bilingual_str consistency (Wladimir J. van der Laan) Pull request description: A straightforward and hopefully uncontroversial refactor to improve consistency. - Move the decision whether to translate an individual error message to where it is defined. This simplifies call sites: no more `InitError(Untranslated(SomeFunction(...)))`. - 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. Also make a function static that can be static. ACKs for top commit: MarcoFalke: ACK 6fe989054f0ad9308e8a25f7123d9e5dd67f1164 🔣 hebasto: ACK 6fe989054f0ad9308e8a25f7123d9e5dd67f1164, tested on Linux Mint 19.3 (x86_64). Tree-SHA512: 1dd123ef285c4b50bbc429b2f11c9a63aaa669a84955a0a9b8134e9dc141bc38f863f798e8982ac68bbe83170e1067a87d1a87fe7f791928b7914e10bbc2ef8d
Diffstat (limited to 'src/interfaces/node.cpp')
-rw-r--r--src/interfaces/node.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/interfaces/node.cpp b/src/interfaces/node.cpp
index bd1b36fea..7995d8d7b 100644
--- a/src/interfaces/node.cpp
+++ b/src/interfaces/node.cpp
@@ -56,7 +56,7 @@ namespace {
class NodeImpl : public Node
{
public:
- void initError(const std::string& message) override { InitError(Untranslated(message)); }
+ void initError(const bilingual_str& message) override { InitError(message); }
bool parseParameters(int argc, const char* const argv[], std::string& error) override
{
return gArgs.ParseParameters(argc, argv, error);