You are here: Scripting Reference > Functions > Exceptions > ExceptionToString

ExceptionToString

Declaration

Function ExceptionToString(See "ExceptionType", See "ExceptionParam"): string;

Example

procedure OnMapEvent(var Value:Variant);

begin

try

Value := 1/0;

except

LogError('Exception occurred: ' + ExceptionToString(ExceptionType, ExceptionParam));

end;

end;

Description

Returns the exception formatted as a String error message. You should log the results of this call to the action Log or Windows Event Viewer (Refer See "Logging" functions)