OMNeT++ NEDXML  6.0.3
ErrorStore Class Reference

#include <errorstore.h>

Description

Stores error and warning messages

Public Member Functions

 ErrorStore ()
 
 ~ErrorStore ()
 
void setPrintToStderr (bool p)
 
void addError (ASTNode *context, const char *messagefmt,...)
 
void addError (const char *location, const char *messagefmt,...)
 
void addWarning (ASTNode *context, const char *messagefmt,...)
 
void addWarning (const char *location, const char *messagefmt,...)
 
void add (ASTNode *context, int severity, const char *messagefmt,...)
 
void add (const char *location, int severity, const char *messagefmt,...)
 
bool empty () const
 
int numMessages () const
 
bool containsError () const
 
void clear ()
 

Returns properties of the ith message stored (i=0..numMessages-1)

const char * errorSeverity (int i) const
 
int errorSeverityCode (int i) const
 
const char * errorLocation (int i) const
 
ASTNodeerrorContext (int i) const
 
const char * errorText (int i) const
 
int findFirstErrorFor (ASTNode *node, int startIndex) const
 
static const char * severityName (int severity)
 

Constructor & Destructor Documentation

◆ ErrorStore()

ErrorStore ( )
inline

Ctor

◆ ~ErrorStore()

~ErrorStore ( )
inline

Member Function Documentation

◆ setPrintToStderr()

void setPrintToStderr ( bool  p)
inline

If set, errors get dumped to stderr as well as stored

◆ addError() [1/2]

void addError ( ASTNode context,
const char *  messagefmt,
  ... 
)

Add an error message with the severity ERROR.

◆ addError() [2/2]

void addError ( const char *  location,
const char *  messagefmt,
  ... 
)

Add an error message with the severity ERROR.

◆ addWarning() [1/2]

void addWarning ( ASTNode context,
const char *  messagefmt,
  ... 
)

Add an error message with the severity WARNING.

◆ addWarning() [2/2]

void addWarning ( const char *  location,
const char *  messagefmt,
  ... 
)

Add an error message with the severity WARNING.

◆ add() [1/2]

void add ( ASTNode context,
int  severity,
const char *  messagefmt,
  ... 
)

Add an error message.

◆ add() [2/2]

void add ( const char *  location,
int  severity,
const char *  messagefmt,
  ... 
)

Add an error message.

◆ empty()

bool empty ( ) const
inline

Return true if there are no messages stored.

◆ numMessages()

int numMessages ( ) const
inline

Total number of error, warning and info messages.

◆ containsError()

bool containsError ( ) const

Returns true if there is an error or fatal error stored.

◆ clear()

void clear ( )
inline

Discard all messages stored.

◆ errorSeverity()

const char* errorSeverity ( int  i) const

◆ errorSeverityCode()

int errorSeverityCode ( int  i) const

◆ errorLocation()

const char* errorLocation ( int  i) const

◆ errorContext()

ASTNode* errorContext ( int  i) const

◆ errorText()

const char* errorText ( int  i) const

◆ findFirstErrorFor()

int findFirstErrorFor ( ASTNode node,
int  startIndex 
) const

Return the first message with index >= startIndex whose context is the given node. Returns -1 if none found.

◆ severityName()

static const char* severityName ( int  severity)
static

Convert severities from numeric to textual form.


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