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.
將字串型表示式或數值型表示式轉換為「錯誤」子類型的變體型表示式。
傳回一個錯誤代碼,用於識別程式執行程序中出現的錯誤。
Use VBA Err object to raise or handle runtime errors.
Returns the error message that corresponds to a value or raises a given error context.
Resets error information and indicates what to execute next.
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.