PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • 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/iPadApple WatchUniversal Windows 10 AppWindows Mobile
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
Universal Windows 10 App This function is now available in Windows Store apps mode.
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 18
Universal Windows 10 App This function is now available in Windows Store apps mode.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Universal Windows 10 App This function is now available in Windows Store apps mode.
iPhone/iPad This function is now available for the 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.
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
RESULT 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:
epDisplayMessageDisplays the error message in a window that proposes the following choices: Retry, Cancel and Stop.
WEBDEV - Server codeWEBDEV - Browser 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 codeWEBDEV - Browser code This constant is not available.
epDisplayMessageEndProcessDisplays the error message in a window that proposes the following choices: Cancel and Stop.
WEBDEV - Server codeWEBDEV - Browser 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 codeWEBDEV - Browser code This constant is not available.
epCodeCurrent mode: the error is processed by programming (test the return value of the functions, using ErrorOccurred, ...)
epExecuteProcedureRuns the procedure specified in 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 mechanism for processing the error, regardless whether it is managed automatically (by the window for error management) or by programming (ErrorChangeParameter) is not triggered if the WLanguage function or the user procedure is found 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.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230vm.dll
Windows Mobile wp230vm.dll
Linux wd230vm.so
Minimum required version
  • Version 10
This page is also available for…
Comments
Click [Add] to post a comment