ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / Exception functions
  • How to get information about the error processed?
  • Use example
  • Special case
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
ErrorPropagate (Function)
In french: ErreurPropage
Propagates a non-fatal error that can be processed by the calling code if the management of non-fatal errors is enabled for this code (in the code editor or by ErrorChangeParameter).
The error is processed by the higher level if:
  • an error process was enabled by the higher level.
  • the error is not handled by an IF ... NOT or by the ErrorOccurred variable.
Syntax

Propagating a non-fatal error (adding a message, if necessary) Hide the details

ErrorPropagate([<Message>])
<Message>: Optional character string
Additional message that can be added to the error. This message is inserted at the beginning of the error.

Propagating a non-fatal error by changing the error number (and adding a message, if necessary) Hide the details

ErrorPropagate(<Number> [, <Message>])
<Number>: Integer
Error number, defined by the developer. This number must be between 1 and 1000. This number replaces the existing error number.
<Message>: Optional character string
Additional message that can be added to the error. This message is inserted at the beginning of the error.
Remarks

How to get information about the error processed?

ErrorInfo returns information about the error.

Use example

Purpose: Encapsulate the fOuvre function in a procedure, while tracing the error of the fOpen function (if any):
PROCEDURE OuvreFichier(LOCAL sNomFichier is string)

fOpen(sNomFichier)
IF ErrorOccurred = True THEN
	ErrorPropagate()
	RETURN		// ou RENVOYER
END
...
Then, you have the ability to call the OpenFile procedure:
...
OuvreFichier(sNomFichier)
IF ErrorOccurred = True THEN
	// traitement de l'erreur
END
Note: It is of course possible to do the same with automatic error handling modes.

Special case

The error handling mechanism, whether it is managed automatically (via the error handling window) or programmatically (with ErrorChangeParameter), is not triggered if the WLanguage function or the user procedure is in one of the following cases:
IF NOT <Function or procedure> THEN
// process the error
END
<Function or procedure>
IF ErrorOccurred = True THEN
// process the error
END
The mechanism considers that the error is processed through programming and the automatic process is not triggered.
Business / UI classification: Neutral code
Component: wd300vm.dll
Minimum version required
  • Version 10
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help