Error (LEADDlgImgDoc Control) example for Delphi

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