Page MenuHomePhabricator

refactor: Error message bilingual_str consistency
ClosedPublic

Authored by Fabien on Dec 10 2020, 22:05.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Commits
rABC29d51c3416b7: refactor: Error message bilingual_str consistency
Summary
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.

Backport of core PR19176.
The change to kitchen_sink.cpp is not ported since this file hasn't
been ported yet, but the compiler will make the change obvious when
needed.

Depends on D8650.

Test Plan
ninja all check-all
ninja bitcoin-fuzzers

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable