GetLastExceptionObject function

Top  Previous  Next

EurekaLog includes a function called GetLastExceptionObject, that enables you to obtain the object instance (TObject) of the last raised exception (only if valid too, otherwise nil).

 

Syntax of this function is as follows:

 

function GetLastExceptionObject: TObject;

 

Example:

 

 

uses ExceptionLog; // The required unit...

 

begin

   ...

   if (GetLastExceptionObject <> nilthen

     WriteLn(Format('Last Exception class name: "%s"', [GetLastExceptionObject.ClassName]))

   else

     WriteLn('Unknown last exception class name!');

   ...

end;