Error (LEADDlgImgDoc Control) example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender) 
{
   LEADDlgImgDoc1->EnableMethodErrors = true; 
     try
   {
      LEADDlgImgDoc1->ShowRemoveRedeyeDlg ( NULL ); 
   }
   catch (...)
   {
      ShowMessage("Calling ShowRemoveRedeyeDlg method failed\n Error No " + IntToStr(LEADDlgImgDoc1->Error) + "\n" + LEADDlgImgDoc1->ErrorMsg); 
   }
}