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

Omformar eit streng- eller taluttrykk til eit variant-uttrykk av typen «Error».

Erl-funksjonen

Returnerer linjenummeret der feilen dukka opp under køyringa av programmet.

Err-funksjonen

Returnerer ein feilkode som indikerer feilen som oppsto under køyringa av progrmmet.

Err Object [VBA]

Use VBA Err object to raise or handle runtime errors.

IsError Function

Kontrollerer om ein variabel inneheld ein feilverdi.

Error-funksjonen

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

On Error GoTo ... Resume-uttrykket

Opprettar ein felhandsamingsrutine etter at det oppstod ein feil, eller tek opp igjen programkøyringa.

Resume Statement

Resets error information and indicates what to execute next.