|
|
|
|
|
- Overview
- Declaration syntaxes
- Process of simple exception
- Process of advanced exception
- Functions for managing the specific exceptions
Mechanism of specific exceptions
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.
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: | | ExceptionInfo | Retrieves the information regarding the error processed by the exception (this function replaces the exception variables used in WINDEV 5.5). | ExceptionPropagate | Propagates an exception. | ExceptionThrow | Artificially triggers an exception process for a given error. |
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|