node::AbortNode

Abort the node in response to a fatal, unrecoverable internal error.

Synopsis

Declared in <node/abort.h>

void
AbortNode(
    std::function<bool()> const& shutdown_request,
    std::atomic<int>& exit_status,
    bilingual_str const& message,
    node::Warnings* warnings);

Description

Records the error as a warning, requests a shutdown through the supplied callback, and reports the exit status back to the caller.

Parameters

NameDescription
shutdown_requestCallback invoked to request that the node shut down.
exit_statusAtomic exit status set to a failure value for the caller to observe.
messageHuman-readable description of the fatal error.
warningsOptional warnings subsystem the error is recorded in; may be null.