getErrorStackTrace()

Returns a dynamic string containing the stack trace (call stack) of an occurred exception.

Synopsis

dyn_string getErrorStackTrace(errClass | dyn_errClass exception);

Parameters

Parameter Meaning
exception Exception whose stack trace shall be returned.

Return value

Stack trace

Description

Returns a dynamic string containing the stack trace (call stack) of an occurred exception.

This function should be used for exception handlings only (exceptions with try- and catch-block). See also Control structures in CONTROL.

Example

main()
{
  try
  {
    throw(makeError("", PRIO_SEVERE, ERR_PARAM, 54,
    "my_exception"));
  }
  catch
  {
    DebugN(getLastException()); 
    DebugN(getErrorStackTrace(getLastException()));
  }
}

Assignment

Error functions

Availability

CTRL