getErrorPriority()

Returns the priority of the error from getLastError() from the error class.

Synopsis

int getErrorPriority(errClass err | dyn_errClass err);

Parameters

Parameter Description
err Return value from getLastError(). The parameter dyn_errClass returns the element of the LAST (!!) error that occurred.

Return value

The return value can assume any of the following CONTROL constants:

value Meaning
PRIO_FATAL Fatal error, stop program immediately.
PRIO_SEVERE Error, program continues to run.
PRIO_WARNING Warning
PRIO_INFO Information
PRIO_FATAL_NO_RESTART Fatal error, stops immediately and will not start again.

Error

Argument error

Description

The value returned from the Control functiongetLastError() defines an error class that is composed of several attributes. From this, the attribute error priority can be filtered out, for example, with getErrorPriority().

Example

main()
{
  dyn_errClass err;
  int errPriority;
  err = getLastError();
  errPriority = getErrorPriority(err);
  switch (errPriority)
  {
    case PRIO_FATAL:
    DebugN("Program aborted")
    case PRIO_FATAL_NO_RESTART:
    DebugN("Program aborted, no restart");
    break;
    case PRIO_FATAL:
    DebugN("Server Error");
    case PRIO_SEVERE:
    DebugN("something");
  }
}

Assignment

Errors

Availability

CTRL