ExceptionParam returns an exception parameter string, that is used in the ExceptionToString function and RaiseException function.

Declaration: function ExceptionParam: string;

If the value of this parameter is null, no exception information is included or returned as illustrated in this example.

procedure ScriptEvent (var Value : variant);
var
Int1, Int2, Int3 : integer;
begin
//Try to divide an integer by zero - to raise an exception
try
Int1 := 10;
Int2 := 0;
Int3 := Int1 / Int2;
//These lines will execute if no error
LogInfo('Fabulous!');
LogInfo('There was no problem encountered!');
except
LogInfo('Exception occurred: ' + ExceptionToString(ExceptionType, ExceptionParam));
LogInfo('');
Int3 := 100;
LogInfo('The variable has been set to '+IntToStr(Int3));
LogInfo('');
//Now raise to let Statelake automatically handle the error reporting
//The Action will terminate after the RaiseException
// RaiseException(ExceptionType, ExceptionParam);
end;
//The following lines will never be processed
LogInfo('');
LogInfo('The Action has completed.');
 
end;