Fungsi Penanganan Kesalahan

Isi
Indeks 🔎︎

# 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

mengubah tanda string atau tanda numerik ke tanda berbeda dari jenis "Kesalahan".

## Fungsi Erl

Mengembalikan nomor baris tempat galat terjadi selama eksekusi program.

## Fungsi Err

Mengembalikan kode galat yang mengidentifikasi galat yang terjadi selama eksekusi program.

## Err Object [VBA]

Use VBA Err object to raise or handle runtime errors.

## IsError Function

Menguji apakah suatu variabel mengandung nilai galat.

## Fungsi Error

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

## Pada Galat GoTo ... Pernyataan Resume

Mengaktifkan rutinitas penanganan kesalahan setelah kesalahan terjadi, atau melanjutkan kembali eksekusi program.

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