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

Chuyển đổi một biểu thức kiểu chuỗi hay thuộc số sang một biểu thức kiểu hay biến đổi có kiểu phụ « Lỗi ».

Erl Function

Trả về số thứ tự dòng trên đó lỗi xảy ra trong khi thực hiện chương trình.

Err Function

Trả về một mã lỗi mà nhận diện lỗi đã xảy ra trong khi thực hiện chương trình.

Err Object [VBA]

Use VBA Err object to raise or handle runtime errors.

IsError Function

Thử nếu một biến chứa một giá trị lỗi, hay không.

Error Function

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

On Error GoTo ... Resume Statement

Gặp lỗi thì hiệu lực một hàm quản lý lỗi, hoặc tiếp tục lại thực hiện chương trình.

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!