ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Exception functions
  • Overview
  • Declaration syntaxes
  • Process of simple exception
  • Process of advanced exception
  • Functions for managing the specific exceptions
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
Mechanism of specific exceptions
Overview
A process of specific exception is used to process a risky code (which means a code that could trigger an exception). The exception will be triggered if a programming error occurs in the specified code.
This specific exception process will only be available in the process in which it was declared.
Remarks
  • A specific exception process can be declared in any process.
  • A specific exception process has priority over a general exception process.
  • After the execution of an exception process, the WLanguage code following the process is run.
  • A specific exception process cannot be declared in another specific exception process.
Java The general exception process is not available.
Declaration syntaxes

Process of simple exception

WHEN EXCEPTION IN
<"Code that can trigger an exception">
DO
<"Code for processing the exception">
END
<Rest of code>

Process of advanced exception

WHEN EXCEPTION IN
<"Code that can trigger an exception">
DO
<"Code for processing the exception">
ELSE
<"Code used if the exception is not triggered">
END
<Rest of code>
Functions for managing the specific exceptions
Some functions specific to the management of the exceptions can be used in the processes of specific exceptions:
ExceptionInfoRetrieves the information regarding the error processed by the exception (this function replaces the exception variables used in WINDEV 5.5).
ExceptionPropagatePropagates an exception.
ExceptionThrowArtificially triggers an exception process for a given error.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help