getLastException()

Gets the last exception that occurred during processing of the function.

Synopsis

dyn_errClass getLastException();

Parameters

Parameter Meaning
None -

Return value

Exception

Description

Gets the last exception that occurred during processing of the function. A list of functions that set the errClass in case of an error you can find in chapter getLastError().

Example

main()
{
  try
  {
    DebugN("main: try");
    throw(makeError("", PRIO_SEVERE, ERR_PARAM, 54, "In
    main:try"));
    foo();
    DebugN("main: try end");
  }
  catch
  {
    DebugN("main: catch");
    DebugN(getLastException());
    // throw(makeError("", PRIO_SEVERE, ERR_PARAM, 54, "In main:
    catch")); 
    DebugN("main: catch end");
  }
  finally
  {
    DebugN("main: finally");
    // throw(makeError("", PRIO_SEVERE, ERR_PARAM, 54, "In main:
    finally")); 
    DebugN("main: finally end");
  }
  DebugN("main: end");
}
foo()
{
  try
  {
    DebugN("foo: try");
    throw(makeError("", PRIO_SEVERE, ERR_PARAM, 54, "In
    foo:try"));
    DebugN("foo: try end");
  }
  finally
  {
    DebugN("foo: finally");
    // throw(makeError("", PRIO_SEVERE, ERR_PARAM, 54, "In
    foo:finally"));
    DebugN("foo: finally end");
  }
  DebugN("foo: end");
}

Assignment

Error functions

Availability

CTRL