tp::DebugReportHandler class

A base class for debug report handlers, containing callbacks through which debug messages and runtime errors are reported.

Derived classes

class StandardReportHandler
A tp::DebugReportHandler implementation with default message formatting, writing to a standard output stream.

Public functions

void callbackMessage(const DebugMessage& message) virtual noexcept
Will be called on a debug message.
void callbackRuntimeError(const DebugMessageContext& context, const RuntimeError& error) virtual noexcept
Will be called when a Tephra error is about to be thrown.
void callbackStatisticEvent(const StatisticEventInfo& eventInfo) virtual
Will be called with statistic event reports gathered during various stages of execution when such callbacks are enabled through the TEPHRA_ENABLE_DEBUG_STATISTIC_EVENTS preprocessor define.
auto getSeverityMask() const -> DebugMessageSeverityMask virtual noexcept
Returns the message severity mask. Only messages with these levels will be passed to tp::DebugReportHandler::callbackMessage.
auto getTypeMask() const -> DebugMessageTypeMask virtual noexcept
Returns the message severity mask. Only messages of these types will be passed to tp::DebugReportHandler::callbackMessage.

Function documentation

void tp::DebugReportHandler::callbackMessage(const DebugMessage& message) virtual noexcept

Will be called on a debug message.

Parameters
message The details of the message.

void tp::DebugReportHandler::callbackRuntimeError(const DebugMessageContext& context, const RuntimeError& error) virtual noexcept

Will be called when a Tephra error is about to be thrown.

Parameters
context The Tephra context of where the error was triggered.
error The runtime error thrown.

void tp::DebugReportHandler::callbackStatisticEvent(const StatisticEventInfo& eventInfo) virtual

Will be called with statistic event reports gathered during various stages of execution when such callbacks are enabled through the TEPHRA_ENABLE_DEBUG_STATISTIC_EVENTS preprocessor define.

Parameters
eventInfo The information about the event.