Error (LEADDlgEffect Control) example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
begin
   LEADDlgEffect1.EnableMethodErrors:= true; 
     try
      LEADDlgEffect1.ShowGetShapeDlg ( Nil ); 
   except
      ShowMessage('Calling ShowGetShapeDlg method failed'#10'Error No ' + IntToStr(LEADDlgEffect1.Error) + #10 + LEADDlgEffect1.ErrorMsg); 
   end; 
end;