mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
node: Make translations of fatal errors consistent
The extra `bilingual_str` argument of the fatal error notifications and `node::AbortNode()` is often unused and when used usually contains the same string as the message argument. It also seems to be confusing, since it is not consistently used for errors requiring user action. For example some assumeutxo fatal errors require the user to do something, but are not translated. So simplify the fatal error and abort node interfaces by only passing a translated string. This slightly changes the fatal errors displayed to the user. Also de-duplicate the abort error log since it is repeated in noui.cpp.
This commit is contained in:
parent
b50554babd
commit
ddc7872c08
14 changed files with 52 additions and 58 deletions
|
|
@ -84,15 +84,15 @@ void KernelNotifications::warning(const bilingual_str& warning)
|
|||
DoWarning(warning);
|
||||
}
|
||||
|
||||
void KernelNotifications::flushError(const std::string& debug_message)
|
||||
void KernelNotifications::flushError(const bilingual_str& message)
|
||||
{
|
||||
AbortNode(&m_shutdown, m_exit_status, debug_message);
|
||||
AbortNode(&m_shutdown, m_exit_status, message);
|
||||
}
|
||||
|
||||
void KernelNotifications::fatalError(const std::string& debug_message, const bilingual_str& user_message)
|
||||
void KernelNotifications::fatalError(const bilingual_str& message)
|
||||
{
|
||||
node::AbortNode(m_shutdown_on_fatal_error ? &m_shutdown : nullptr,
|
||||
m_exit_status, debug_message, user_message);
|
||||
m_exit_status, message);
|
||||
}
|
||||
|
||||
void ReadNotificationArgs(const ArgsManager& args, KernelNotifications& notifications)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue