Workspace 6.21.5
Public Member Functions | List of all members
TemporaryErrors Class Reference

#include <Distributed/temporaryerrors.h>

Public Member Functions

 TemporaryErrors ()
 
 ~TemporaryErrors ()
 
bool add (int errorSource, const Application::LogManager::MessageCategory &category, const QString &message)
 
void clear (int errorSource)
 
void clearAll ()
 

Constructor & Destructor Documentation

◆ TemporaryErrors()

◆ ~TemporaryErrors()

~TemporaryErrors ( )
default

Member Function Documentation

◆ add()

bool add ( int  errorSource,
const Application::LogManager::MessageCategory category,
const QString &  message 
)
Parameters
errorSourceUse same number to group error messages together
categoryLog category of the error
messageActual error message.

Instead of directly log the error message, use TemporaryErrors to reduce the repetition of similar messages by calling this method For any errorSource, only one of each unique error messages writes to log. Following repetitions would be only accumulated to its counter.

◆ clear()

void clear ( int  errorSource)
Parameters
errorSourceUse same number to group error messages together

Mark the errorSource being resolved, prints a summary of most commonly collected messages.

◆ clearAll()

void clearAll ( )

Silently clear all temporary errors.