AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Funciones estándar / Funciones de excepciones
  • How to get information about the error processed?
  • Special case
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Configures the automatic behavior that will be implemented if an error occurs in the current process. The previous behavior can be restored by ErrorRestoreParameter.
Ejemplo
// Initializes the connection to the HFSQL Client/Server database
// Returns True if everything is OK, False otherwise
PROCEDURE 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
// RETURN False
// END

// Open the connection
// IF HOpenConnection("Connection") = False THEN
//	RETURN False
// END

//  OK
// RETURN True
Sintaxis
ErrorChangeParameter(<Behavior to implement> [, <Parameter 1> [, <Parameter 2>]])
<Behavior to implement>: Integer constant
Behavior to implement:
epCodeCurrent mode: the error is processed by programming (function return value test, use of ErrorOccurred, etc.)
epDisplayMessageDisplays the error message in a window that proposes the following choices: Retry, Cancel and Stop.
WEBDEV - Código Servidor This constant is not available.
epDisplayMessageEndProcessDisplays the error message in a window that proposes the following choices: Cancel and Stop.
WEBDEV - Código Servidor This constant is not available.
epDisplayMessageEndProgramDisplays the error message in a window that proposes the following choices: Stop and Restart (Stop by default).
WEBDEV - Código Servidor This constant is not available.
epDisplayMessageRelaunchProgramDisplays the error message in a window that proposes the following choices: Stop and Restart (Restart by default).
WEBDEV - Código Servidor This constant is not available.
epExecuteProcedureRuns the procedure specified as parameter. This procedure must return one of the following constants:
  • opAnnuler: the function causes an error in the procedure call code.
  • opFinTraitement the error is validated and the user takes over again
  • opFinProgram (default): the application is stopped.
  • opTry retries the instruction
  • opRelanceProgramme stops and restarts the application.
epGotoCaseErrorExecutes the code defined by the label: CASE ERROR:
epResultValidates the errors. Exits 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 constant epDisplayMessage constant: in this case, the error message will be displayed before executing the indicated behavior.
<Parameter 1>: Optional parameter
Optional parameter depending on the selected behavior.
<Parameter 2>: Optional parameter
Optional parameter depending on the selected behavior.
Observaciones

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 through programming and the automatic process is not triggered.
Clasificación Lógica de negocio / UI: Código neutro
Componente: wd300vm.dll
Versión mínima requerida
  • Versión 10
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/03/2025

Señalar un error o enviar una sugerencia | Ayuda local