VAPOR3 3.9.4
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends | List of all members
ErrorReporter Class Reference

A utility singleton class that provides error reporting functinality. More...

#include <ErrorReporter.h>

Classes

struct  Message
 

Public Types

enum  Type {
  Diagnostic = 0 , Info = 1 , Warning = 2 , Error = 3 ,
  Fatal = 4
}
 

Public Member Functions

 ErrorReporter (QWidget *parent)
 

Static Public Member Functions

static ErrorReporterGetInstance ()
 
static void ShowErrors ()
 Displays the current log of errors with the default message ERRORREPORTER_DEFAULT_MESSAGE.
 
static void Report (std::string msg, Type severity=Diagnostic, std::string details="")
 
static std::string GetSystemInformation ()
 
static int OpenLogFile (std::string path)
 

Protected Member Functions

 ~ErrorReporter ()
 

Friends

void _myBaseErrorCallback (const char *msg, int err_code)
 
void _myBaseDiagCallback (const char *msg)
 

Detailed Description

A utility singleton class that provides error reporting functinality.

Author
Stas Jaroszynski
Version
3.0
Date
July 2017

Definition at line 78 of file ErrorReporter.h.

Member Enumeration Documentation

◆ Type

Enumerator
Diagnostic 
Info 
Warning 
Error 
Fatal 

Definition at line 81 of file ErrorReporter.h.

Constructor & Destructor Documentation

◆ ErrorReporter()

ErrorReporter::ErrorReporter ( QWidget *  parent)

◆ ~ErrorReporter()

ErrorReporter::~ErrorReporter ( )
protected

Member Function Documentation

◆ GetInstance()

static ErrorReporter * ErrorReporter::GetInstance ( )
inlinestatic

Returns the singleton instance of this class with lazy initialization

Return values
ErrorReporterinstance

Definition at line 93 of file ErrorReporter.h.

◆ GetSystemInformation()

static std::string ErrorReporter::GetSystemInformation ( )
static

Returns basic system OS information

Return values
stringcontaining OS information

◆ OpenLogFile()

static int ErrorReporter::OpenLogFile ( std::string  path)
static

Opens log file and begins logging error and diagnostic messages

Return values
intreturns -1 on failure

◆ Report()

static void ErrorReporter::Report ( std::string  msg,
Type  severity = Diagnostic,
std::string  details = "" 
)
static

Displays an error message with the log of errors and outputs the message to the log file

Parameters
stringmsg to display explaining error cause/implications
Typeseverity of message
stringdetails of error. Default to current erros in log

◆ ShowErrors()

static void ErrorReporter::ShowErrors ( )
static

Displays the current log of errors with the default message ERRORREPORTER_DEFAULT_MESSAGE.

Friends And Related Function Documentation

◆ _myBaseDiagCallback

void _myBaseDiagCallback ( const char *  msg)
friend

◆ _myBaseErrorCallback

void _myBaseErrorCallback ( const char *  msg,
int  err_code 
)
friend

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