Error-Handling Functions

Use the following statements and functions to define the way LibreOffice Basic reacts to run-time errors.

LibreOffice Basic offers several methods to prevent the termination of a program when a run-time error occurs.

CVErr Function

Konvertas ĉenan esprimon aŭ numeran esprimon al varianta esprimo de la subtipo "Error".

Erl Function

Liveras la linian nombron kie eraro okazis dum programa ruliĝo.

Err Function

Liveras prieraran kodon kiu identigas la eraron okazintan dum programa ruliĝo.

Err Object [VBA]

Use VBA Err object to raise or handle runtime errors.

IsError Function

Testas ĉu variablo enhavas valoron de tipo 'error' (eraro).

Error Function

Returns the error message that corresponds to a value or raises a given error context.

On Error GoTo ... Resume Statement

Ŝaltas erarotraktantan procedon post okazo de eraro, aŭ reekrulas programon.

Resume Statement

Resets error information and indicates what to execute next.

ScriptForge.Exception service

The Exception service is a collection of methods to assist in code debugging in Basic and Python scripts and in error handling in Basic scripts.

In Basic scripts, when a run-time error occurs, the methods and properties of the Exception service help identify the error context and allow to handle it.

Bonvolu subteni nin!