Squirt 3.21
OaLogger Class Reference

Creates localized WinCC OA error messages and logs them at a chosen priority. More...

Public Member Functions

public OaLogger (const string msgCatalog="")
 Creates a logger using an optional message catalog. More...
 
public void info (const anytype &codeOrError, const anytype note=NULL, const anytype note2=NULL, const anytype note3=NULL)
 Logs or throws an informational message. More...
 
public void warning (const anytype &codeOrError, const anytype note=NULL, const anytype note2=NULL, const anytype note3=NULL)
 Logs or throws a warning message. More...
 
public void severe (const anytype &codeOrError, const anytype note=NULL, const anytype note2=NULL, const anytype note3=NULL)
 Throws a severe error message. More...
 
public void fatal (const anytype &codeOrError, const anytype note=NULL, const anytype note2=NULL, const anytype note3=NULL)
 Logs or throws a fatal message. More...
 
protected void _throw (const anytype &codeOrError, const int prio, const anytype &note, const anytype &note2, const anytype &note3)
 Constructs and emits an error using the requested priority. More...
 

Public Attributes

protected string msgCatalog
 Message catalog used when constructing errors from plain text.
 

Detailed Description

Creates localized WinCC OA error messages and logs them at a chosen priority.

Severe messages are thrown as exceptions; other priorities are sent through throwError(). String messages are wrapped in the configured message catalog, while existing error objects are passed through.

Attention
This documentation is created with the help of an artificial intelligence.

Constructor & Destructor Documentation

◆ OaLogger()

public OaLogger::OaLogger ( const string  msgCatalog = "")

Creates a logger using an optional message catalog.

Parameters
msgCatalogMessage catalog used when constructing errors from text.

Member Function Documentation

◆ _throw()

protected void OaLogger::_throw ( const anytype &  codeOrError,
const int  prio,
const anytype &  note,
const anytype &  note2,
const anytype &  note3 
)

Constructs and emits an error using the requested priority.

Parameters
codeOrErrorMessage text, error code, or existing error object.
prioWinCC OA error priority.
noteOptional first substitution value or error note.
note2Optional second substitution value or error note.
note3Optional third substitution value or error note.

◆ fatal()

public void OaLogger::fatal ( const anytype &  codeOrError,
const anytype  note = NULL,
const anytype  note2 = NULL,
const anytype  note3 = NULL 
)

Logs or throws a fatal message.

Parameters
codeOrErrorMessage text, error code, or existing error object.
noteOptional first substitution value or error note.
note2Optional second substitution value or error note.
note3Optional third substitution value or error note.

◆ info()

public void OaLogger::info ( const anytype &  codeOrError,
const anytype  note = NULL,
const anytype  note2 = NULL,
const anytype  note3 = NULL 
)

Logs or throws an informational message.

Parameters
codeOrErrorMessage text, error code, or existing error object.
noteOptional first substitution value or error note.
note2Optional second substitution value or error note.
note3Optional third substitution value or error note.

◆ severe()

public void OaLogger::severe ( const anytype &  codeOrError,
const anytype  note = NULL,
const anytype  note2 = NULL,
const anytype  note3 = NULL 
)

Throws a severe error message.

Parameters
codeOrErrorMessage text, error code, or existing error object.
noteOptional first substitution value or error note.
note2Optional second substitution value or error note.
note3Optional third substitution value or error note.

◆ warning()

public void OaLogger::warning ( const anytype &  codeOrError,
const anytype  note = NULL,
const anytype  note2 = NULL,
const anytype  note3 = NULL 
)

Logs or throws a warning message.

Parameters
codeOrErrorMessage text, error code, or existing error object.
noteOptional first substitution value or error note.
note2Optional second substitution value or error note.
note3Optional third substitution value or error note.

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