MIGetErrorCode() function - MapBasic - 2023

MapInfo MapBasic Reference

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapBasic
Version
2023
Language
English
Product name
MapBasic
Title
MapInfo MapBasic Reference
First publish date
1985
Last updated
2023-09-12
Published on
2023-09-12T16:32:32.686312

Purpose

Retrieves the last error that was set as a result of a call to a function in this library.

Syntax

MIGetErrorCode() As Integer

Return Value

Error code of the last error set.

Description

MIGetErrorCode() is called if the function's return value indicates its failure and you want to know the error code. To obtain an error message as a String, call the MIGetErrorMessage() function.

The error value retrieved is only set when certain errors occur during calls to other functions in the HTTP and FTP API. It is primarily useful for determining which error occurred as a result of a call to the MISendRequest() function or the MISendSimpleRequest() function so the correct value can be passed to the MIErrorDlg() function.