Skip to main content
All docs
V25.1
  • TdxAzureMapResponse.ErrorInfo Property

    Provides access to detailed error information if the current server query is not successful.

    Declaration

    property ErrorInfo: TdxAzureMapErrorDetail read;

    Property Value

    Type Description
    TdxAzureMapErrorDetail

    Stores detailed information on an Azure Maps server query.

    The property value is nil (in Delphi) or nullptr (in C++Builder) if an Azure Maps server does not return query error information.

    Remarks

    Use ErrorInfo and StatusCode properties to obtain detailed error information if the IsSuccess property returns False.

    Code Example: Validate Server Response

    The code example in this topic section demonstrates a function that checks if an Azure Maps server response is valid. The function returns False and displays a message box with the corresponding error message if a server query fails.

    uses
      dxMessageDialog;  // Declares the dxMessageDlg global function
    // ...
    
    function TMyForm.ValidateServerResponse(AResponse: TdxAzureMapResponse): Boolean;
    begin
      if AResponse <> nil then
      begin
        Result := AResponse.IsSuccess;
        if not Result and Assigned(AResponse.ErrorInfo) then
          dxMessageDlg(AResponse.ErrorInfo.Message, TMsgDlgType.mtError, [mbOK], 0);
      end
      else
        Result := False;
    end;
    
    See Also