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

문자열 식 또는 숫자 식을 "Error" 하위 유형의 Variant 식으로 변환합니다.

Erl Function

프로그램 실행 도중에 오류가 발생한 줄 번호를 표시합니다.

Err Function

프로그램 실행 도중에 발생한 오류를 식별하는 오류 코드를 표시합니다.

Err Object [VBA]

Use VBA Err object to raise or handle runtime errors.

IsError Function

변수에 오류 값이 있는지 검사합니다.

Error Function

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

On Error GoTo ... Resume Statement

오류가 발생한 후 오류 처리 루틴을 활성화하거나 프로그램 실행을 다시 시작합니다.

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.

Please support us!