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?
  • Use example
  • 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
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.
Sintaxis

Propagating a non-fatal error (adding a message, if necessary) Ocultar los detalles

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) Ocultar los detalles

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.
Observaciones

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 OpenFile(LOCAL sFileName is string)

fOpen(sFileName)
IF ErrorOccurred = True THEN
	ErrorPropagate()
	RETURN		// or RESULT
END
...
Then, you have the ability to call the OpenFile procedure:
...
OpenFile(sFileName)
IF ErrorOccurred = True THEN
	// process the error
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.
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