ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Exception functions
  • Equivalence
  • HFSQL error
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Retrieves information about the last error that occurred in a function of a WINDEV, WINDEV Mobile or WEBDEV component.
Caution:
  • ErrorInfo must be used immediately after the call to the function that failed. Indeed, calling a WLanguage function may reinitialize and modify the status report of ErrorInfo.
  • ErrorInfo should not be used to check whether an error has been encountered. To check if a WLanguage function has encountered an error, use one of the following methods:
    • check the status report of the WLanguage function.
    • check the ErrorOccurred variable.
Example
// Open the overview file
nFileID is int = fOpen(FileName, foRead)
// Check the file opening
IF nFileID = -1 THEN
	Error("Unable to open the file: " + FileName, ErrorInfo())
	RETURN False
END
Universal Windows 10 App
// Error found?
IF ErrorOccurred = True THEN
	// Full message of the main error
	Trace(ErrorInfo())
	// Browse the sub-errors (if any)
	FOR i = 1 _TO_ ErrorInfo(errNumberSubError)
		// Full message of each sub-error
		Trace("Sub-error " + i + ": " + ErrorInfo(errMessage, i))
	END
END
Syntax

Getting information about the last error Hide the details

<Result> = ErrorInfo([<Type of information>])
<Result>: Character string or integer
  • Requested information.
  • Empty string ("") if no error occurred or if the requested information is not available.
<Type of information>: Optional constant
Information to return.
errCodeError code
Universal Windows 10 AppAndroidAndroid Widget This constant is ignored.
errDateTimeDate and time of error
Universal Windows 10 AppAndroidAndroid Widget iPhone/iPadIOS WidgetMac Catalyst This constant is ignored.
errDebugInfoSpecific information for debugging the problem that occurred. This information should only be displayed and communicated on express demand from PC SOFT.

Universal Windows 10 AppiPhone/iPadIOS WidgetMac Catalyst This constant is ignored.
errDuringName of the WLanguage function that threw the error.
errElementName of object associated with the current process when the error occurred.
Universal Windows 10 AppAndroidAndroid Widget This constant is ignored.
errFICFull name of the data file (.FIC) associated with the error.
Universal Windows 10 AppAndroidAndroid Widget This constant is ignored.
errFileLogical name of the file associated with the error.
Universal Windows 10 AppAndroidAndroid Widget This constant is ignored.
errFullComponentNameFull name of the component being executed.
For example:
  • "" (empty string): main application context.
  • "Component1": "Component1" component directly used in the project.
  • "Component1.Component2": "Component2" component used from "Component1".
Universal Windows 10 AppAndroidAndroid Widget iPhone/iPadIOS WidgetMac Catalyst This constant is ignored.
errFullDetailsFull error details (error line, current process, etc.).
Remark: Returns the same information as the one retrieved via the "Copy" button in the WLanguage error window.
errInfoAdditional information.
Universal Windows 10 AppAndroidAndroid Widget This constant is ignored.
errItemName of the item associated with the error.
Universal Windows 10 AppAndroidAndroid Widget This constant is ignored.
errLineNumber of the error line.
Universal Windows 10 AppAndroidAndroid Widget This constant is ignored.
errLinkName of the link associated with the error.
Universal Windows 10 AppAndroidAndroid Widget This constant is ignored.
errMessage
(default value)
Full error message.
errMMOFull name of the memo file (.MMO) associated with the error.
Universal Windows 10 AppAndroidAndroid Widget This constant is ignored.
errNDXFull name of the index file (.NDX) associated with the error.
Universal Windows 10 AppAndroidAndroid Widget This constant is ignored.
errNumberSubErrorNumber of sub-errors for the error
Universal Windows 10 AppAndroidAndroid Widget iPhone/iPadIOS WidgetMac Catalyst This constant is ignored.
errProcessName of process in progress when the error occurred.
Universal Windows 10 AppAndroidAndroid Widget This constant is ignored.
errRecNumNumber of the record associated with the error.
Universal Windows 10 AppAndroidAndroid Widget This constant is ignored.
errStackStack of WLanguage calls
iPhone/iPadIOS WidgetApple WatchMac Catalyst This constant is ignored.
errSummarySummary of error
errSystemCodeNumber of the system error (if it exists)
Universal Windows 10 AppAndroidAndroid Widget This constant is ignored.
errSystemMessageMessage of system error (if it exists).
errWDDFull name of the WDD file associated with the error.
Universal Windows 10 AppAndroidAndroid Widget This constant is ignored.
Universal Windows 10 App

Getting information about the sub-errors of the last error Hide the details

<Result> = ErrorInfo(<Type of information> , <Sub-error subscript>)
<Result>: Character string or integer
  • Requested information.
  • Empty string ("") if no sub-error occurred or if the requested information is not available.
<Type of information>: Constant
Information to return.
errCodeCode of the sub-error.
errDateTimeDate and time of sub-error.
errDebugInfoSpecific information for debugging the problem that occurred. This information should only be displayed and communicated on express demand from PC SOFT.

errDuringName of WLanguage function that threw the sub-error.
errElementName of object associated with the process in progress when the sub-error occurred.
errFICFull name of data file (.FIC) associated with the sub-error.
errFileLogical name of file associated with the sub-error.
errFullDetailsFull details of sub-error (sub-error line, current process, etc.).

Remark: Returns the same information as the one retrieved via the "Copy" button in the WLanguage error window.
errInfoAdditional information.
errItemName of item associated with the sub-error.
errLineNumber of the sub-error line.
errLinkName of link associated with the sub-error.
errMessage
(default value)
Full message of sub-error.
errMMOFull name of memo file (.MMO) associated with the sub-error.
errNDXFull name of index file (.NDX) associated with the sub-error.
errProcessName of process in progress when the sub-error occurred.
errRecNumNumber of record associated with the sub-error.
errStackStack of WLanguage calls.
errSummarySummary of sub-error.
errSystemCodeNumber of the system sub-error (if it exists).
errSystemMessageMessage of system error (if it exists).
errWDDFull name of WDD associated with the sub-error.
<Sub-error subscript>: Integer
Index of sub-error to use.
Reminder: The number of sub-errors for an error is returned by the errNumberSubError constant.
Remarks

Equivalence

Calling Error without any parameters displays the error message corresponding to the last WLanguage function that triggered an error.
In this case, the following code:
Error()
is equivalent to:
Error(ErrorInfo())

HFSQL error

When an HFSQL error occurs, ErrorInfo is equivalent to HErrorInfo.
Component: wd300vm.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/04/2024

Send a report | Local help