OMNeT++ NEDXML  5.4.1
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 ()
 
int findFirstErrorFor (ASTNode *node, int startIndex) const
 
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
 

Static Public Member Functions

static const char * severityName (int severity)
 

Constructor & Destructor Documentation

ErrorStore ( )
inline

Ctor

~ErrorStore ( )
inline

Member Function Documentation

void setPrintToStderr ( bool  p)
inline

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

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

Add an error message with the severity ERROR.

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

Add an error message with the severity ERROR.

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

Add an error message with the severity WARNING.

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

Add an error message with the severity WARNING.

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

Add an error message.

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

Add an error message.

bool empty ( ) const
inline

Return true if there are no messages stored.

int numMessages ( ) const
inline

Total number of error, warning and info messages.

bool containsError ( ) const

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

void clear ( )
inline

Discard all messages stored.

const char* errorSeverity ( int  i) const
int errorSeverityCode ( int  i) const
const char* errorLocation ( int  i) const
ASTNode* errorContext ( int  i) const
const char* errorText ( int  i) const
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.

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: