PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • How to get information about the error processed?
  • Special case
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
ErrorChangeParameter (Function)
In french: ErreurChangeParamètre
Configures the automatic behavior that will be implemented if an error occurs in the current process. The previous behavior can be restored by ErrorRestoreParameter.
Versions 18 and later
iPhone/iPad This function is now available for iPhone/iPad applications.
New in version 18
iPhone/iPad This function is now available for iPhone/iPad applications.
iPhone/iPad This function is now available for iPhone/iPad applications.
Versions 21 and later
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Versions 27 and later
Java This function is now available for Java applications.
Android This function is now available for Android applications.
Android Widget This function is now available in Android widget mode.
New in version 27
Java This function is now available for Java applications.
Android This function is now available for Android applications.
Android Widget This function is now available in Android widget mode.
Java This function is now available for Java applications.
Android This function is now available for Android applications.
Android Widget This function is now available in Android widget mode.
Example
// Initializes the connection to the HFSQL Client/Server database
// Returns True if everything is OK, False otherwise
PROCÉDURE InitializeConnection()
// If an error occurs, exit and return False
ErrorChangeParameter(epResult, False)
// Describe the connection
HDescribeConnection("Connection", "user", "password", ...
"server","database", hAccessHFClientServer)
// Open the connection
HOpenConnection("Connection")
// OK
RETURN True
 
// Code replaced
// Initializes the connection to the HFSQL Client/Server database
// Returns True if everything is OK, False otherwise
// PROCEDURE InitializeConnection()
// Describe the connection
// IF HDescribeConnection("Connection", "user", "password", ...
// "server", "database", hAccessHFClientServer) = False THEN
// RESULT False
// END
 
// Open the connection
// IF HOpenConnection("Connection") = False THEN
// RESULT False
// END
 
//  OK
// RESULT True
Syntax
ErrorChangeParameter(<Behavior to implement> [, <Parameter 1> [, <Parameter 2>]])
<Behavior to implement>: Integer constant
Behavior to implement:
epCodeCurrent mode: the error is processed through programming (test the return value of the functions, using ErrorOccurred, ...)
epDisplayMessageDisplays the error message in a window that proposes the following choices: Retry, Cancel and Stop.
WEBDEV - Server code This constant is not available.
epDisplayMessageEndProcessDisplays the error message in a window that proposes the following choices: Cancel and Stop.
WEBDEV - Server code This constant is not available.
epDisplayMessageEndProgramDisplays the error message in a window that proposes the following choices: Stop and Restart (Stop by default).
WEBDEV - Server code This constant is not available.
epDisplayMessageRelaunchProgramDisplays the error message in a window that proposes the following choices: Stop and Restart (Restart by default).
WEBDEV - Server code This constant is not available.
epExecuteProcedureRuns the procedure specified as parameter. This procedure must return one of the following constants:
  • opCancel: the function triggers an error in the code used to call the procedure.
  • opEndProcess: the error is validated and the user takes control
  • opEndProgram (by default): the application is stopped.
  • opRetry: retries the statement
  • opRelaunchProgram: stops and restarts the application.
epGotoCaseErrorRuns the code defined by: CASE ERROR:
epResultValidates the errors. Exits from the current process and returns the specified value (<Parameter 1> contains the value to return).
epResultErrorValidates the errors. Exits from the current process, returns the specified value (<Parameter 1> contains the value to return) and propagates the error.
The error is automatically processed by the higher level (if the error process is enabled), or by IF NOT xxx or IF ErrorOccurred.
<Parameter 2> contains n additional error messages.
epReturnValidates the errors. Exits from the current process.
The error is not propagated if the automatic management of errors is enabled in the calling code.
epReturnErrorValidates the errors. Exits from the current process and propagates the error.
The error is automatically processed by the higher level (if the error process is enabled), or by IF NOT xxx or IF ErrorOccurred. The error is propagated if the automatic management of errors is enabled in the calling code.
These constants can be combined with the epDisplayMessage constant: in this case, the error message will be displayed before running the specified behavior.
<Parameter 1>: Optional parameter
Optional parameter depending on the selected behavior.
<Parameter 2>: Optional parameter
Optional parameter depending on the selected behavior.
Remarks

How to get information about the error processed?

ErrorInfo returns information about the error.

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 by programming and the automatic process is not triggered.
Business / UI classification: Neutral code
Component: wd270vm.dll
Minimum version required
  • Version 10
This page is also available for…
Comments
Click [Add] to post a comment