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" 子类型的变量表达式。

Erl 函数

返回在程序执行过程中出现错误的行号。

Err 函数

返回一个错误代码,用于标识程序执行过程中出现的错误。

Err Object [VBA]

Use VBA Err object to raise or handle runtime errors.

IsError Function

测试变量是否含有错误值。

Error 函数

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

On Error GoTo ... Resume 语句

发生错误时启用错误处理例程或恢复程序执行。

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.

请支持我们!