This documentation was styled with a demo skin from the Premium Pack 4 add-on for Help & Manual. The contents of the skin are encrypted and not configurable. You can only publish HM projects with this skin. You cannot edit it or change it.
This version is copyright and may only be used for local testing purposes. It may not be distributed.
Please purchase the full version of the Premium Pack to get the configurable skins and remove this notice. The package will also include the Toolbox configuration utility for Premium Pack skins.
Description
Retrieve errors information occurred during object handling.
Syntax
nCol = <cCSV>.Errors[(nErrorCode)]
Returns
Number
Total number of errors occurred or total number of specific error code occurred
Parameters
Name |
Type |
Optional |
Meaning |
nErrorCode |
Number |
Yes |
If no parameter is specified, property will return total number of errors occurred so far into the CCSV object.
If a specific error code is specified, property will return total number of specific error type occurred so far into the CCSV object.
Please use one of the following specific error codes:
%CSV_Error_FileNotFound
%CSV_Error_Data_Access_Outside_Column_Limits
%CSV_Error_Data_Access_Outside_Row_Limits
|
Remarks
It is a good idea to check this property in order to make sure any possible error is detected.
Restrictions
See also
Examples
uses "CSV", "console"
dim data as new cCSV
data.Load(APP_ScriptPath + "NonExistingFile.csv", True) ' Intentionally wrong filename
printl $("Data of cell at row a, column 3: '{data.Column.Data(2, 3)}'")
printl "Testing errors"
printl $("Number of run time errors occurred: {data.Errors}")
if data.Errors > 0 Then
printl $("%CSV_Error_Type_FileNotFound {data.Errors(%CSV_Error_Type_FileNotFound)}")
printl $("%CSV_Error_Type_Data_Access_Outside_Column_Limits {data.Errors(%CSV_Error_Type_Data_Access_Outside_Column_Limits)}")
printl $("%CSV_Error_Type_Data_Access_Outside_Row_Limits {data.Errors(%CSV_Error_Type_Data_Access_Outside_Row_Limits)}")
end If
waitkey