Pascal Scripting: ShowExceptionMessage

Inno Setup

Pascal Scripting: ShowExceptionMessage

Prototype:

procedure ShowExceptionMessage;

Description:

Shows the message associated with the current exception in a message box. This function should only be called from within an except section, or a function called from an except section.

Remarks:

If logging is enabled (via the /LOG command line parameter or the SetupLogging [Setup] section directive) the message will recorded in the log in addition to being shown.

Example:
var
  I: Integer;
begin
  I := 1;
  try
    // The following line will raise a "Division by zero" exception
    I := I div 0;
  except
    // Catch the exception, show it, and continue
    ShowExceptionMessage;
  end;
end;