refactor: remove warnings globals

This commit is contained in:
stickies-v
2024-05-07 14:21:35 +01:00
parent 9c4b0b7ce4
commit 260f8da71a
27 changed files with 87 additions and 51 deletions

View File

@@ -15,9 +15,9 @@
namespace node {
void AbortNode(util::SignalInterrupt* shutdown, std::atomic<int>& exit_status, const bilingual_str& message)
void AbortNode(util::SignalInterrupt* shutdown, std::atomic<int>& exit_status, const bilingual_str& message, node::Warnings* warnings)
{
g_warnings.Set(Warning::FATAL_INTERNAL_ERROR, message);
if (warnings) warnings->Set(Warning::FATAL_INTERNAL_ERROR, message);
InitError(_("A fatal internal error occurred, see debug.log for details: ") + message);
exit_status.store(EXIT_FAILURE);
if (shutdown && !(*shutdown)()) {