vkmEngine 1.0.0
A C++ game engine · vkmengine.com
Loading...
Searching...
No Matches
Vkm::Engine::EngineErrorLog Class Reference

Bounded log of recoverable engine errors, for a host to surface. More...

#include <engine_error_log.h>

Public Member Functions

void push (std::string category, std::string source, std::string message)
 Record an error, dropping the oldest entries past CAPACITY.
void clearAll ()
 Drop every buffered entry.
const std::vector< Entry > & entries () const
 The buffered entries.
unsigned long long totalPushed () const
 Monotonic count of entries ever appended.

Detailed Description

Bounded log of recoverable engine errors, for a host to surface.

Filled by reportError() once a host installs it with setErrorSink().

Member Function Documentation

◆ push()

void Vkm::Engine::EngineErrorLog::push ( std::string category,
std::string source,
std::string message )

Record an error, dropping the oldest entries past CAPACITY.

A consecutive duplicate bumps the last entry's count instead.

Parameters
categorySubsystem that raised it.
sourceWhat raised it.
messageWhat went wrong.

◆ entries()

const std::vector< Entry > & Vkm::Engine::EngineErrorLog::entries ( ) const
inline

The buffered entries.

Returns
The live entry list, oldest first.

◆ totalPushed()

unsigned long long Vkm::Engine::EngineErrorLog::totalPushed ( ) const
inline

Monotonic count of entries ever appended.

A deduped repeat does not bump it, so a frame-to-frame diff shows only new errors.

Returns
The count, never reduced by eviction or clearAll().

The documentation for this class was generated from the following file: