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

បម្លែង​កន្សោម​ខ្សែ​អក្សរ ឬ​កន្សោម​លេខ​ទៅ​ជា​កន្សោម​វ៉ារ្យ៉ង់​នៃ​ប្រភេទ​រង "កំហុស" ។

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!