- Main Page
- Modules
- Classes
- Files
- Directories

- File List
- File Members

# nederror.h File Reference

`#include "nedelement.h"`

Go to the source code of this file.

## Classes
class | NEDException
| Low-level routines throw an exception instead of calling NEDError(). More...
## Defines
#define | INTERNAL_ERROR0(context, msg) NEDInternalError(__FILE__,__LINE__,context,msg)
#define | INTERNAL_ERROR1(context, msg, arg1) NEDInternalError(__FILE__,__LINE__,context,msg,arg1)
#define | INTERNAL_ERROR2(context, msg, arg1, arg2) NEDInternalError(__FILE__,__LINE__,context,msg,arg1,arg2)
#define | INTERNAL_ERROR3(context, msg, arg1, arg2, arg3) NEDInternalError(__FILE__,__LINE__,context,msg,arg1,arg2,arg3)
## Functions
void | NEDError (NEDElement *context, const char *message,...)
bool | errorsOccurred ()
void | clearErrors ()
void | NEDInternalError (const char *file, int line, NEDElement *context, const char *message,...)

## Define Documentation

#define INTERNAL_ERROR0 | ( | context,
|  | msg |  | ) | NEDInternalError(__FILE__,__LINE__,context,msg)

#define INTERNAL_ERROR1 | ( | context,
|  | msg,
|  | arg1 |  | ) | NEDInternalError(__FILE__,__LINE__,context,msg,arg1)

#define INTERNAL_ERROR2 | ( | context,
|  | msg,
|  | arg1,
|  | arg2 |  | ) | NEDInternalError(__FILE__,__LINE__,context,msg,arg1,arg2)

#define INTERNAL_ERROR3 | ( | context,
|  | msg,
|  | arg1,
|  | arg2,
|  | arg3 |  | ) | NEDInternalError(__FILE__,__LINE__,context,msg,arg1,arg2,arg3)

## Function Documentation

void clearErrors | ( |  | ) |

| Resets the flag used by errorsOccurred().

bool errorsOccurred | ( |  | ) |

| Returns true if NEDError() has been called since the last clearErrors().

void NEDError | ( | NEDElement * | context,
|  | const char * | message,
|  |  | ...
| ) |

| Adds a compiler error message. Currently the message is printed to the standard error; this is going to be refined.

void NEDInternalError | ( | const char * | file,
|  | int | line,
|  | NEDElement * | context,
|  | const char * | message,
|  |  | ...
| ) |

| Called when an internal error occurs. It prints an appropriate message, then calls abort(). This method is typically used via the INTERNAL_ERROR0()...INTERNAL_ERROR4() macros that add the __FILE__, __LINE__ args implicitly.