ludus::foundation::base¶
Ludus Wiki · API overview · Browse API
Namespace
Declared in modules/foundation/base/include/ludus/foundation/base/diagnostic.hpp
Enumerations¶
DiagnosticSeverity¶
enum class DiagnosticSeverity : uint8
Small severity vocabulary for the emergency primitive.
It is intentionally independent of FoundationLogging's LogLevel so Base never depends on Logging; the logging module maps its LogLevel onto these when it uses the primitive.
Related types: uint8
Note¶
Note
Warning¶
Warning
Error¶
Error
Fatal¶
Fatal
Declared in modules/foundation/base/include/ludus/foundation/base/diagnostic.hpp
Functions¶
EmergencyReport¶
void ludus::foundation::base::EmergencyReport(DiagnosticSeverity severity, std::string_view categoryName, std::string_view message, const std::source_location &location=std::source_location::current()) noexcept
Report one emergency diagnostic.
message is already-final text; the primitive performs no formatting of its own beyond composing the fixed header and the source suffix, so it stays allocation-free. Uses Base's emergency byte writer: a configured diagnostic socket, otherwise potentially blocking stderr. Reentry: if called again while a previous call on this thread is still in progress (e.g. a fault during the write), it emits a minimal literal and returns, so it can never recurse or grow the stack. category then message, matching the logging call convention; always passed as named/literal args, so a swap is not a realistic hazard. Related types: DiagnosticSeverity
Declared in modules/foundation/base/include/ludus/foundation/base/diagnostic.hpp
EmergencyNote¶
void ludus::foundation::base::EmergencyNote(std::string_view message, const std::source_location &location=std::source_location::current()) noexcept
Convenience for internal notes that have no meaningful caller site.
Uses the current source location and the "Diagnostic" category.
Declared in modules/foundation/base/include/ludus/foundation/base/diagnostic.hpp
EmergencyReentryCount¶
uint64 ludus::foundation::base::EmergencyReentryCount() noexcept
Number of times a reentrant (nested) emergency call was suppressed.
Exposed for tests/diagnostics so recursion suppression is observable (requirements R32); it never triggers further reporting.
Related types: uint64
Declared in modules/foundation/base/include/ludus/foundation/base/diagnostic.hpp