GetLastExceptionCallStack function

Top  Previous  Next

EurekaLog includes a function called GetLastExceptionCallStack, that enables you to obtain the last Exception Call-Stack (it works with handled and unhandled exceptions).

 

Syntax of this function is as follows:

 

function GetLastExceptionCallStack: TEurekaStackList;

 

 

Example:

 

 

uses ExceptionLog; // The required unit...

 

var

   CallStackList: TStringList;

   CallStack: TEurekaStackList;

begin

   CallStackList := TStringList.Create;

   try

     CallStack := GetLastExceptionCallStack;

     try

       CallStackToStrings(CallStack, CallStackList);

       // ...

       // Use the CallStackList here...

       // ...

     finally

       CallStack.Free;

     end;

   finally

     CallStackList.Free;

   end;

end;