Error (LEADDlgImage Control) example for Delphi

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